Still adding commands.

This commit is contained in:
Chris Lane 2013-08-10 11:26:56 -04:00
parent e51fa9b29f
commit 1786a57d5e
1 changed files with 18 additions and 4 deletions

22
cheat
View File

@ -15,17 +15,16 @@ cheatsheets = {
# - df # - df
# - du # - du
# - fdisk # - fdisk
# - fstab
# - mount # - mount
# - mysqldump # - mysqldump
# - mysqlimport # - mysqlimport
# - mongodump # - mongodump
# - mongoimport # - mongoimport
# - nc # - nc
# - redirect to stdout
# - rsync # - rsync
# - sed # - sed
# - shred # - shred
# - ssh-keygen
# - useradd / adduser # - useradd / adduser
# - xargs # - xargs
@ -71,6 +70,11 @@ for file in `ls original/image/path/`;
done done
''', ''',
########## dd ################################################################
'dd' : '''
@todo
''',
########## dhclient ########################################################## ########## dhclient ##########################################################
'dhclient' : ''' 'dhclient' : '''
To release the current IP address: To release the current IP address:
@ -151,6 +155,15 @@ For more information, see:
http://unix.stackexchange.com/q/12755/44856 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 ########################################################
'ssh-copy-id' : ''' 'ssh-copy-id' : '''
To copy a key to a remote host: 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 can be aliased under a different keyphrase like this:
cheatsheets['dbus'] = cheatsheets['notify-send'] cheatsheets['dbus'] = cheatsheets['notify-send']
cheatsheets['imagick'] = cheatsheets['convert'] cheatsheets['imagick'] = cheatsheets['convert']
cheatsheets['redirection'] = cheatsheets['stdout']
# print help if requested # print help if requested
if keyphrase in ['', 'help', '--help', '-h']: if keyphrase in ['', 'help', '--help', '-h']: