Bash Flashcards
What is Bash?
Short for Bourne Again SHell. It’s a command line interpreter
man ls
takes you to the manual for all the details on the command “ls”
What are the commands for:
copy a file,
remove a file
cp filename.txt newfile.txt,
rm filename.txt
cat
concatenates files together, or just prints to screen
what are the commands for:
print the directory you are in,
list the contents of the directory you are in,
list the contents of another directory
pwd,
ls,
ls foldername
ls -l foldername
list the long details for all the contents of the folder
What are the commands for:
create a directory
remove a directory
mkdir directoryname
rmdir directoryname
How to look at the contents of a file: print out the whole thing to the screen print out part of a long file so you can step through peek at the beginning of the file peek at the last lines of the file
cat filename.txt
more filename.txt (space to move through, q to quit)
head filename.txt
tail filename.txt
what is tilde expansion or brace expansion?
Using tilde or braces in shortcuts for long or repeated commands
cd ~
cd ~-
change to home directory
change to last directory I was in (old pwd)