Unix Commands Flashcards
ls -l
List files, long form
pwd
Print working directory
file
Determine file type
date
Print or set the system date and time
date -r
Display the last modification time of a file
touch [file1, file2…]
Updates the access and modification times of each file to the current time. Creates file if it does not exist
chmod
Changes file access permissions
man
Displays the manual page for a command
man -k
Searches the manual for a keyword
cd
Change directory
cd [blank]
Go back to home directory
cd -
Go back to previous directory
mkdir
Make a new directory
mv
Rename or move a file or directory
rm
Delete a file
rm -rf
Delete a directory
rmdir
Delete an empty directory
cp
Copy a file
cp -r
Copy a directory
ls
List files
cat
Concatenates (prints) file to screen
cat -n
Prints file with line numbers
vi
Opens a file in a text editor
>
Redirect output (typically to a file)