Linux Commands Flashcards
List a directory’s content
ls
Shows the current working directory’s path
pwd
Changes the working directory
cd
Creates a new directory
mkdir
Deletes a file
rm
Copies files and directories, including their content
cp
Moves or renames files and directories
mv
Creates a new empty file
touch
Checks a file’s type
file
Creates and extracts a ZIP archive
zip and unzip
Archives files without compression in a TAR format
tar
Edits a file with a text editor
nano, vi, and jed
Lists, combines, and writes a file’s content as a standard output
cat
Searches a string within a file
grep
Finds, replaces, or deletes patterns in a file
sed
Displays a file’s first ten lines
head
Prints a file’s last ten lines
tail
Finds and manipulates patterns in a file
awk
Reorders a file’s content
sort
Sections and prints lines from a file
cut
Compares two files’ content and their differences
diff
Prints command outputs in Terminal and a file
tee
Finds files in a system’s database
locate