2.4 Finding Your Way - Creating, Moving, and Deleting Files Flashcards
Which of the following commands will create a new directory called Test in the /tmp folder?
A) mkdir /tmp/Test
B) newdir
C) dir /tmp/Test
D) mkdir ./tmp/Test
mkdir /tmp/Test
mkdir /tmp/Test will create a new directory called Test in the /tmp folder.
Which of the following commands will delete the Test directory in the folder above the current working directory?
A) rm -r ../../Test
B) rm -r */Test
C) rm -r /Test
D) rm -r ../Test
rm -r ../Test
rm -r ../Test will delete the Test directory in the folder above the current working directory.
Which of the following commands will move all files in the current directory that start with file_ to /tmp?
A) mv file_. /tmp
B) mv file_? /tmp
C) mv file_ /tmp
D) mv file_* /tmp
mv file_* /tmp
What command will copy the directory testdir_1 to testdir_2?
cp -r testdir_1 testdir_2
What command will remove the directory testdir_1?
rm -r testdir_1
What command will copy the file testfile_1 to testfile_2?
cp testfile_1 testfile_2
What command will remove the file testfile_1?
rm testfile_1
What wildcard will match any single character?
?
ex: ls ????4 will return the output of any file that is 4 characters long and that ends in the number 4.
What wildcard will match any number character(s)?
Asterik symbol
ex: ls *4 will return the output of any number of characters long ending in the number 4.