Created cheatsheets for alias, cat, cp, export, kill, mv, pwd, and wc

This commit is contained in:
shanahanjrs 2017-02-12 22:11:45 -05:00
parent 8cad76943a
commit aa9403d432
8 changed files with 64 additions and 0 deletions

11
cheat/cheatsheets/alias Normal file
View File

@ -0,0 +1,11 @@
# alias - Creates an alias of a command
*Stick these in your .bashrc/.bash_profile for permenant use, otherwise lost on re-entry
alias ll='ls -l'
alias lll='ls -al'
alias vi='vim'
alias ..='cd ..'
alias c='clear'
alias rkhunter='rkhunter --versioncheck --update --autox --skip-keypress --check'
Running just `alias' will show your current aliases.

10
cheat/cheatsheets/cat Normal file
View File

@ -0,0 +1,10 @@
# cat - concatenate and print files
cat [-benstuv] [filename]
-b : Number non blank lines (1 indexed)
-e : Display non printing chars
-n : Number output (1 indexed)
-s : Single spaced output
-t : Display non printing chars (Tab as `^I')
-u : Disable output buffering
-v : Display all non printing chars no matter what

14
cheat/cheatsheets/cp Normal file
View File

@ -0,0 +1,14 @@
# cp - copy. Copies a file or directory
cp [-a, -f, -H, -i, -L, -n, -p, -P, -R, -X] [-v] [source] [target]
-a : Same as -pPR
-f : Force
-H : Follow sym links
-i : Prompt before overwrite
-L : If -R, follow sym links
-n : Do not overwrite
-P : If -R, Do not follow sym links (Default)
-p : Preserve meta data
-R : Recursive (cp directories)
-X : Do not copy extended attributes or resource forks
-v : Verbose

5
cheat/cheatsheets/export Normal file
View File

@ -0,0 +1,5 @@
# Export makes a variable something that will be included in child process environments
export VARNAME="value"
# Calling export with no arguments will show current shell attributes
export

7
cheat/cheatsheets/kill Normal file
View File

@ -0,0 +1,7 @@
# kill - Kills a process
# Kill gracefully
kill -15 [PID]
# Force kill (*Only use if -15 does not work first, this is dirty*)
kill -9 [PID]

7
cheat/cheatsheets/mv Normal file
View File

@ -0,0 +1,7 @@
# mv - move. Moves a file or directory
mv [-f, -i, -n] [-v] [source] [target]
-f : No prompt before overwriting something in target destination. Overrides any previous -i or -n args.
-i : Prompt before overwriting something. Overrides any previous -f or -n args.
-n : Do not overwrite anything. Overrides any previous -f or -i args.
-v : Verbose

3
cheat/cheatsheets/pwd Normal file
View File

@ -0,0 +1,3 @@
# Print Working Directory
# The `pwd' command will show you the absolute path of your current directory on the filesystem
pwd

7
cheat/cheatsheets/wc Normal file
View File

@ -0,0 +1,7 @@
# wc - word count (or lines, characters, or bytes)
wc [-clmw] [output]
-c : Number of bytes (cancels -m opt)
-l : Number of lines
-m : Number of characters (cancels -c opt)
-w : Number of words