Commands tagged help (6)

  • I use this command to start a local Python document server over HTTP port 8888.

    pydoc -p 8888 & gnome-open http://localhost:8888
    haivu · 2010-02-28 07:01:43 2
  • Once you get into advanced/optimized scripts, functions, or cli usage, you will use the sort command alot. The options are difficult to master/memorize however, and when you use sort commands as much as I do (some examples below), it's useful to have the help available with a simple alias. I love this alias as I never seem to remember all the options for sort, and I use sort like crazy (much better than uniq for example). # Sorts by file permissions find . -maxdepth 1 -printf '%.5m %10M %p\n' | sort -k1 -r -g -bS 20% 00761 drwxrw---x ./tmp 00755 drwxr-xr-x . 00701 drwx-----x ./askapache-m 00644 -rw-r--r-- ./.htaccess # Shows uniq history fast history 1000 | sed 's/^[0-9 ]*//' | sort -fubdS 50% exec bash -lxv export TERM=putty-256color Taken from my Show Sample Output

    alias sorth='sort --help|sed -n "/^ *-[^-]/s/^ *\(-[^ ]* -[^ ]*\) *\(.*\)/\1:\2/p"|column -ts":"'
    AskApache · 2010-06-10 21:30:31 0
  • Same as the other rtfm's, but using the more correct xdg-open instead of $BROWSER. I can't find a way to open info only if the term exists, so it stays out of my version.

    rtfm() { help $@ || man $@ || xdg-open "$@"; }
    KlfJoat · 2014-04-25 04:17:03 1
  • Most of you are probably familiar with the "apropos" command for searching man pages. However, did you know there's a similar command inside of gdb? If, for example, you wanted to know all gdb commands that related to threads, you could type "apropos thread". Type "help some_command" to receive more information about a command. Type "help" by itself to see a list of help topics.

    gdb command: apropos <keyword>
    kFiddle · 2009-05-01 23:19:35 0

  • 0
    apropos -a keywords
    lolssl · 2015-09-22 16:42:57 0
  • don't `man bash` Show Sample Output

    help builtin
    kev · 2011-12-25 04:52:49 2

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Check These Out

Save your open windows to a file so they can be opened after you restart
This will save your open windows to a file (~/.windows). To start those applications: $ cat ~/.windows | while read line; do $line &; done Should work on any EWMH/NetWM compatible X Window Manager. If you use DWM or another Window Manager not using EWMH or NetWM try this: $ xwininfo -root -children | grep '^ ' | grep -v children | grep -v '' | sed -n 's/^ *\(0x[0-9a-f]*\) .*/\1/p' | uniq | while read line; do xprop -id $line _NET_WM_PID | sed -n 's/.* = \([0-9]*\)$/\1/p'; done | uniq -u | grep -v '^$' | while read line; do ps -o cmd= $line; done > ~/.windows

Mutt - Change mail sender.

exec chmod to subfiles
Using `-exec cmd {} +` causes find to build the command using all matching filenames before execution, rather than once per file.

Outputs a 10-digit random number

Command to logout all the users in one command
It's only to logout all other user's except "root"

Detect illegal access to kernel space, potentially useful for Meltdown detection
Based on capsule8 agent examples, not rigorously tested

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

Open (in vim) all modified files in a git repository
For editing files added to the index: $ vim `git diff --name-only --cached` To edit all changed files: $ vim `git diff --name-only HEAD` To edit changed files matching glob: $ vim `git diff --name-only -- '*.html'` If the commands needs to support filenames with whitespace, it gets a bit hacky (see for the reason): $ git diff --name-only -z | xargs -0 bash -c '

Add line number count as C-style comments
I often find the need to number enumerations and other lists when programming. With this command, create a new file called 'inputfile' with the text you want to number. Paste the contents of 'outputfile' back into your source file and fix the tabbing if necessary. You can also change this to output hex numbering by changing the "%02d" to "%02x". If you need to start at 0 replace "NR" with "NR-1". I adapted this from

Get AWS temporary credentials ready to export based on a MFA virtual appliance
You might want to secure your AWS operations requiring to use a MFA token. But then to use API or tools, you need to pass credentials generated with a MFA token. This commands asks you for the MFA code and retrieves these credentials using AWS Cli. To print the exports, you can use: `awk '{ print "export AWS_ACCESS_KEY_ID=\"" $1 "\"\n" "export AWS_SECRET_ACCESS_KEY=\"" $2 "\"\n" "export AWS_SESSION_TOKEN=\"" $3 "\"" }'` You must adapt the command line to include: * $MFA_IDis ARN of the virtual MFA or serial number of the physical one * TTL for the credentials

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: