basic commands Flashcards
echo
print screen(-n = do not print)
pwd
show location
what is the anatomy of a command
[command][arguments…]
tar
an archival command that can archive, compress, and extract files, but to make it work, you need to tell it which files to take action on, and what exactly to do with those files
tar -c -z -f
create zip file(flags)
[man][command]
show the manual of a certain command
cd
change current directory
ls
see what’s in a directory
cd ~
go to home directory
mkdir
make a directory in current location
[touch][filename.example]
create a new file
mv
move or rename a file. example: [mv][filename][newname] [mv][source][destination] [mv][filename][location] [mv][subfolder/file][newname](will rename file and move it to current folder)
rm
remove a file
rm -r
remove a folder and all its contents
cat
print out all the contents of a file
head
print the first few lines of a file
tail
print the last few lines of a file
more
print out the contents of a file, but only fill one screen’s worth at a time
less
The less command allows you to go forward one line with the down arrow, backward one line with the up arrow, and backward and forward a page with the page up and page down keys. You can also use the space bar in the same way you can with the more command
/
root directory
.
current directory
..
one level up
../..
two levels up
*
The “splat” or “glob” operator. This is the wildcard of the command line and represents “any characters”