Basic Commands Flashcards
1
Q
rm
A
remove (delete) a file
- -r is used for recursive (use rm -r to remove a directory)
2
Q
rmdir
A
remove (delete) a directory (use rm -r if the directory contains files)
3
Q
cd
A
change directory to move around the file structure
4
Q
. (dot)
A
current directory
5
Q
.. (dot dot)
A
parent directory
6
Q
ls
A
list the contents of a directory
- -l (prints long form of the file list)
- -a (show all files, including hidden files)
7
Q
touch
A
create a new file
8
Q
less
A
read the contents from a file
9
Q
nano
A
a command line text editor
10
Q
ln
A
link a file
- -s (creates a softlink)
11
Q
cp
A
copy a file
Syntax: (cp file1 file2)
12
Q
mkdir
A
make a new directory
13
Q
clear
A
Clears the terminal prompt screen
14
Q
pwd
A
print working directory (displays where you are in the filesystem)
15
Q
cat
A
concatenate and print files