From 1786a57d5ecb2a204043233b7e7d16c78bf2cf30 Mon Sep 17 00:00:00 2001 From: Chris Lane Date: Sat, 10 Aug 2013 11:26:56 -0400 Subject: [PATCH] Still adding commands. --- cheat | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/cheat b/cheat index d62ec1e..21dc14d 100755 --- a/cheat +++ b/cheat @@ -15,17 +15,16 @@ cheatsheets = { # - df # - du # - fdisk +# - fstab # - mount # - mysqldump # - mysqlimport # - mongodump # - mongoimport # - nc -# - redirect to stdout # - rsync # - sed # - shred -# - ssh-keygen # - useradd / adduser # - xargs @@ -71,6 +70,11 @@ for file in `ls original/image/path/`; done ''', +########## dd ################################################################ +'dd' : ''' +@todo +''', + ########## dhclient ########################################################## 'dhclient' : ''' To release the current IP address: @@ -151,6 +155,15 @@ For more information, see: http://unix.stackexchange.com/q/12755/44856 ''', +########## redirection ######################################################## +'stdout' : ''' +To redirect stderr to stdout: +some-command 2>&1 + +To redirect stderr to a file +some-command 2> errors.txt +''', + ########## ssh-copy-id ######################################################## 'ssh-copy-id' : ''' To copy a key to a remote host: @@ -196,8 +209,9 @@ tar -cjvf /path/to/foo.tgz /path/to/foo/ } # Cheatsheets can be aliased under a different keyphrase like this: -cheatsheets['dbus'] = cheatsheets['notify-send'] -cheatsheets['imagick'] = cheatsheets['convert'] +cheatsheets['dbus'] = cheatsheets['notify-send'] +cheatsheets['imagick'] = cheatsheets['convert'] +cheatsheets['redirection'] = cheatsheets['stdout'] # print help if requested if keyphrase in ['', 'help', '--help', '-h']: