Linux Commands Flashcards
0
Q
cat
A
Print content of file
1
Q
pwd
A
Print working directory.
Show path to where you are.
2
Q
ls
A
List directory contents
3
Q
cp
A
Copy file
4
Q
mv
A
Rename file
5
Q
mv dir/file dir2/file
A
Move file
6
Q
rm
A
Delete (remove) file
7
Q
cd $HOME
A
Change to home directory
8
Q
ls -alrth myfile
A
List metadata
9
Q
touch myfile
A
Create a new file named myfile
10
Q
echo blahblah»_space; myfile
A
Append “blahblah” to myfile
11
Q
rmdir mydir
A
Remove directory (if empty)
12
Q
rmdir -rf mydir
A
Delete directory and everything in it
13
Q
alias xx = ‘some command’
A
Create shortcut for a command
14
Q
mkdir mydir
A
Create a directory