mirror of
https://github.com/Erreur32/cheat.git
synced 2024-12-22 21:52:12 +01:00
Still adding commands.
This commit is contained in:
parent
e51fa9b29f
commit
1786a57d5e
1 changed files with 18 additions and 4 deletions
22
cheat
22
cheat
|
@ -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']:
|
||||||
|
|
Loading…
Reference in a new issue