Basic Commands Flashcards
To learn basic unix commands
1
Q
list files and directories
A
ls
2
Q
list all files and directories
A
ls -a
3
Q
make a directory
A
mkdir
4
Q
change to named directory
A
cd directory_name
5
Q
change to home-directory
A
cd or cd ~
6
Q
change to parent directory
A
cd ..
6
Q
display the path of the current directory
A
pwd
stands for: Print Working Directory
7
Q
copy file1 and call it file2
A
cp file1 file2
8
Q
move or rename file1 to file2
A
mv file1 file2
9
Q
remove a file
A
rm filename
10
Q
remove a directory
A
rmdir directoryname
11
Q
display a file
A
cat filename
12
Q
display a file a page at a time
A
less filename
13
Q
displat the first few lines of a file
A
head filename
14
Q
display the last few lines of a file
A
tail filename