Terminal And Bash Flashcards
Print Working Directory Command
pwd - Displays the current working directory
List Directory and files in current directory
ls
ls -lh (long form, human readable)
ls -lha (long form, human readable, include hidden files)
Change Directory
cd
cd ~ (home directory)
cd / (root directory)
Make directroy
mkdir
Remove directory
rmdir
Remove a file
rm
rm -r (removes directory and all it’s subdirectories and files with the -r recursive option)
Create an empty file
touch
Clear the page
clear
What is an Absolute path
Indicates the location of a file regardless of your current location in the file system
What is a Relative path
Path that starts at your current location and doesn’t require you to work backwards
Copy command
cp
Command to view a file one page at a time. Space bar to move to next page
more
View a file one page at a time,
Forward, Backward, Horizontal scrolling and one line at a time
less
Display top 10 lines of a file
head
head - (number of lines option)
Display bottom 10 lines of a file
tail
tail -Number of line (option)