Merge pull request #699 from notpeter/single-command
This commit is contained in:
@@ -2,18 +2,22 @@
|
||||
|
||||
> Prints calendar information.
|
||||
|
||||
- Display a calendar for the current month or specified month:
|
||||
- Display a calendar for the current month:
|
||||
|
||||
`cal`
|
||||
`cal -m {{12}}`
|
||||
`cal -m {{Dec}}`
|
||||
|
||||
- Display a calendar for the current year or a specified year:
|
||||
- Display a calendar for a specific month:
|
||||
|
||||
`cal -m {{month_number}}`
|
||||
|
||||
- Display a 12 month calendar for the current year:
|
||||
|
||||
`cal -y`
|
||||
`cal 2013`
|
||||
|
||||
- Display a 12 month calendar for a specific year:
|
||||
|
||||
`cal 2016`
|
||||
|
||||
- Display date of Easter (western churches):
|
||||
|
||||
`ncal -e`
|
||||
`ncal -e 2013`
|
||||
`ncal -e {{year}}`
|
||||
|
@@ -2,33 +2,22 @@
|
||||
|
||||
> List directory contents.
|
||||
|
||||
- List all files, even hidden:
|
||||
- List files one per line:
|
||||
|
||||
`ls -1`
|
||||
|
||||
- List all files, including hidden files:
|
||||
|
||||
`ls -a`
|
||||
|
||||
- List all file names (no extra info):
|
||||
- Long format list (permissions, ownership, size and modification date) of all files:
|
||||
|
||||
`ls -A1`
|
||||
`ls -la`
|
||||
|
||||
- List all files with their rights, groups, owner:
|
||||
|
||||
`ls -l`
|
||||
|
||||
- List all files and display the file size in a human readable format:
|
||||
- Long format list with size displayed using human readable units (KB, MB, GB):
|
||||
|
||||
`ls -lh`
|
||||
|
||||
- List all files with a prefix/suffix:
|
||||
- Long format list sorted by size (descending):
|
||||
|
||||
`ls {{prefix}}*`
|
||||
`ls *{{suffix}}`
|
||||
|
||||
- Sort the results by size, last modified date, or creation date:
|
||||
|
||||
`ls -S`
|
||||
`ls -t`
|
||||
`ls -U`
|
||||
|
||||
- Reverse the order of the results:
|
||||
|
||||
`ls -r`
|
||||
`ls -lS`
|
||||
|
@@ -6,9 +6,12 @@
|
||||
|
||||
`redis-cli`
|
||||
|
||||
- Connect to a remote server:
|
||||
- Connect to a remote server on the default port (6379):
|
||||
|
||||
`redis-cli -h {{host}}`
|
||||
|
||||
- Connect to a remote server specifying a port number:
|
||||
|
||||
`redis-cli -h {{host}} -p {{port}}`
|
||||
|
||||
- Specify a password:
|
||||
|
@@ -2,19 +2,18 @@
|
||||
|
||||
> Renames multiple files.
|
||||
|
||||
- Change foo to bar in matching filenames:
|
||||
- Rename files using a Perl Common Regular Expression (substitute 'foo' with 'bar' wherever found):
|
||||
|
||||
`rename {{'s/foo/bar/'}} {{*.txt}}`
|
||||
`rename {{'s/foo/bar/'}} {{\*}}`
|
||||
|
||||
- Convert to lower case:
|
||||
- Dry-run - display which renames would occur without performing them:
|
||||
|
||||
`rename -c {{*.txt}}`
|
||||
`rename -n {{'s/foo/bar/'}} {{\*}}`
|
||||
|
||||
- Convert filenames to lower case:
|
||||
|
||||
`rename 'y/A-Z/a-z/' {{\*}}`
|
||||
|
||||
- Replace whitespace with underscores:
|
||||
|
||||
`rename --nows {{*.txt}}`
|
||||
`rename 's/\s+/_/g' {{*.txt}}`
|
||||
|
||||
- No action, just show what renames would occur:
|
||||
|
||||
`rename -n {{'s/foo/bar/'}} {{*.txt}}`
|
||||
`rename 's/\s+/_/g' {{\*}}`
|
||||
|
@@ -7,9 +7,12 @@
|
||||
|
||||
`salt-key -L`
|
||||
|
||||
- Accept or reject a minion key by name:
|
||||
- Accept a minion key by name:
|
||||
|
||||
`salt-key -a {{MINION_ID}}`
|
||||
|
||||
- Reject a minion key by name:
|
||||
|
||||
`salt-key -r {{MINION_ID}}`
|
||||
|
||||
- Print fingerprints of all public keys:
|
||||
|
@@ -1,17 +1,19 @@
|
||||
# srm
|
||||
|
||||
> Securely remove files or directories.
|
||||
> Overwrites the existing data one or multiple. Drop in replacement for rm.
|
||||
> Overwrites the existing data one or multiple times. Drop in replacement for rm.
|
||||
|
||||
- Remove a file after overwriting (single pass, 7 pass, 35 pass):
|
||||
- Remove a file after a single-pass overwriting with random data:
|
||||
|
||||
`srm -s {{/path/to/file}}`
|
||||
|
||||
- Remove a file after seven passes of overwriting with random data:
|
||||
|
||||
`srm -m {{/path/to/file}}`
|
||||
`srm {{/path/to/file}}`
|
||||
|
||||
- Scurely remove recursively a directory and all it's subdirectories:
|
||||
- Recursively remove a directory and its contents overwriting each file with a single-pass of random data:
|
||||
|
||||
`srm -r {{/path/to/folder}}`
|
||||
`srm -r -s {{/path/to/folder}}`
|
||||
|
||||
- Prompt before every removal:
|
||||
|
||||
|
@@ -6,11 +6,10 @@
|
||||
|
||||
`touch {{filename}}`
|
||||
|
||||
- Set the times on a file to those specified:
|
||||
- Set the times on a file to a specific date and time:
|
||||
|
||||
`touch -t 201412250801.59 {{filename}}`
|
||||
`touch -t {{YYYYMMDDHHMM.SS}} {{filename}}`
|
||||
|
||||
- Set the times on a file to match those on second file:
|
||||
- Use the times from a file to set the times on a second file:
|
||||
|
||||
`touch -r {{filename2}} {{filename}}`
|
||||
`touch -r {{filename}} {{filename2}}`
|
||||
|
@@ -2,9 +2,8 @@
|
||||
|
||||
> Locate the a program in the user's path.
|
||||
|
||||
- Display the path of an executable program:
|
||||
- Search the PATH environment variable and display the location of any matching executables:
|
||||
|
||||
`which {{ls}}`
|
||||
`which {{executable}}`
|
||||
|
||||
- If there are multiple executables which match, display all:
|
||||
|
Reference in New Issue
Block a user