There are two ways to identify paths:
•Absolute pathname
An absolute pathname begins with the root directory and follows the tree, branch by branch,
until it reaches the desired directory or file. Absolute paths always start with /.
•Relative pathname
A relative pathname starts from the present working directory. Relative paths never start
with /.
find ~<file name>/ -type f -print0 | xargs -0 mv -t ~<file name> –
Move the entire contents of one folder to another folder.
sudo – temporarily use the privileges of the superuser (root)
apt – stands for Advance Package Tool, use the man pages
ls – list the contents of a folder
rm -f <name of file/folder> – forcefully removes a file
rm -rf <name of directory> – removes a directory and all of its
contents
man <command> – open the manual pages (online help) for a command
Dirs – displays the list of directories
apropos <enter command>– look up a command name or description
cd <directory name>– change directory
pwd – print working (current) directory
cp <[file/directory-sources] [destination]> – copy a file
mv <[file/directory-sources] [destination]> – move or rename a file
mkdir <folder name> – create a folder
rmdir <folder name>– remove an empty folder
rm <file name>– remove a file
find – locate files and folders matching certain parameters (find /
-name “my file”)
cat <file name>– concatenate or attach two files (also used to
display a file on the screen)
* – represents zero or more characters
? – represents one of any character
| – pipe command (directs the output of one command to the input of
the next)
echo – display text
wc – display the number of lines, words, and characters in given
input
head – view the first few lines of a text file
tail – view the last few lines of a text file
less – direct text output into a browsable view
grep – search a string or a file for text or a regular expression
sort – change the display order of lines of text
zip – create a zip archive
unzip – extract a zip archive
which – show which executable is being used
uname – view information about the operating system
free – view information about the system’s memory (RAM)
df – show used and free space on the file system
du – show how much space files and folders take up
lshw – show system hardware
ip – show network adapter information
tree – show folder hierarchy visually
find – used to search for a specific text string in a file or files
. – represents the current folder
.. – represents the parent folder
/ – represents the root level of the file system, also used to
separate folders in paths
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim – text editor
vimtutor – text editor tutor
vim <filename>.txt – opens the text file you named
:h[elp] keyword - open help for keyword
:sav[eas] file - save file as
:clo[se] - close current pane
:ter[minal] - open a terminal window
i - insert before the cursor
Esc - exit insert mode
Exiting
:w - write (save) the file, but don't exit
:wq or :x - write (save)and quit
:q - quit (fails if there are unsaved changes)
:q! - quit and throw away unsaved changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FUN!!!
sl
telnet [Link]
fortune
fortune | cowsay
xcowsay <insert text>
cowsay <insert text> | lolcat
toilet -f mono12 -F metal <insert text>
cmatrix
bb