### Commands using man (66) the last day the last week the last month all time sorted by date votes

• Dumping man pages to text typically retains certain formatting such as foo^H^H^H___ for underscoring, and reverse-line feeds (not sure why). 'col -bx' removes these. Show Sample Output

0
man2txt() { man "$@" | col -bx ;} · 2018-10-14 01:38:04 • -1 man !! · 2010-08-14 14:09:31 • Depending on the installation only certain of these man pages are installed. 12 is left out on purpose because ISO/IEC 8859-12 does not exist. To also access those manpages that are not installed use opera (or any other browser that supports all the character sets involved) to display online versions of the manpages hosted at kernel.org: for i in$(seq 1 11) 13 14 15 16; do opera http://www.kernel.org/doc/man-pages/online/pages/man7/iso_8859-$i.7.html; done -2 for i in$(seq 1 11) 13 14 15 16; do man iso-8859-$i; done · 2009-03-31 19:40:15 • This takes quite a while on my system. You may want to test it out with /bin first, or background it and keep working. If you want to get rid of the "No manual entry for [whatever]" and just have the [whatever], use the following sed command after this one finishes. sed -n 's/^No manual entry for $$.*$$/\1/p' nomanlist.txt Show Sample Output -2 for file in$(ls /usr/bin ) ; do man -w $file 2>> nomanlist.txt >/dev/null ; done · 2010-07-26 19:39:53 • Broaden your knowledge of the utilities available to you in no particular order whatsoever! Then use that knowledge to create more nifty one-liners that you can post here. =p Takes a random number modulo the number of files in$dir, prints the filename corresponding to that number, and passes it as an argument to man.

-2
dir="/bin"; man $(ls$dir |sed -n "$(echo$(( $RANDOM %$(ls $dir |wc -l | awk "{ print$1; }" ) + 1 )) )p")
· 2010-08-20 16:31:50
• Great idea camocrazed. Another twist would be to display a different man page based on the day of the year. The following will continuously cycle through all man pages: man $(ls /bin | sed -n$(($(date +%j) %$(ls /bin | wc -l)))p)

-2
man $(ls /bin | sed -n$((RANDOM % $(ls /bin | wc -l) + 1))p) · 2010-08-20 17:15:33 • Another one. Maybe not the quicker because of the sort command, but it will also look in other man sections. updated with goodevilgenius 'shuf' idea -2 man$(ls -1 /usr/share/man/man?/ | shuf -n1 | cut -d. -f1)
· 2010-08-20 23:36:10
• Emacs backs up previous versions by default.

-2
man emacs
· 2011-08-17 00:37:00

• -3
(cd /bin; set -- *; x=$((1+($RANDOM % $#))); man${!x})
· 2010-08-20 17:19:56
• Build an awk array with all commands and then select a random one at the end. This avoids spawning extra processes for counting with wc or generating random numbers. Explicitly call /bin/ls to avoid interactions with aliases.

-4
man $(/bin/ls /bin | awk '{ cmd[i++] =$0 } END { srand(); print cmd[int(rand()*length(cmd))]; }')
· 2010-08-20 17:31:02
• when we work with terminal often we open man pages for help if we did some mistakes and when we want to open the man page for command we are working with this one helps as many people may be knowing that '!!' performs the last command action we use it in sudo !! to perform the last action with root previleages man !! will also be helpful and handy thanx

-4
man !!
· 2010-09-24 13:38:17
• Just type man and the name of the command you want information on followed by enter.. POW!!! there you have all you need to know on the subject.

-4
man <COMMAND>
· 2013-04-05 16:08:01
• Read all chapters up to 'Jumping', improve your effectiveness of wirking in terminal. Most useful are the Moving and Searching commands

-5
man <command> then type h
· 2011-10-16 09:49:56

• -5
man inet
· 2014-05-05 14:43:11
• A very interesting man page!

-7
man ettercap
· 2010-01-29 14:28:38
• Display man page in plain text

-12
man bash | col -b
· 2009-09-10 00:45:27
•  < 1 2 3

### What's this?

commandlinefu.com 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.

### Check These Out

List upcoming events on google calendar
Requires googlecl (http://code.google.com/p/googlecl/) Even better when you wrap this in a script and allow the --date=STRING to be $1. Then you can type: whatson "next Thursday" The date string for UNIX date is very flexible. You can also add --cal "[regex]" to the end for multiple calendars. Find duplicate UID in /etc/passwd You can use only awk find out how much space are occuipied by files smaller than 1024K The command gives size of all files smaller than 1024k, this information, together with disk usage, can help determin file system parameter (e.g. block size) or storage device (e.g. SSD v.s. HDD). Note if you use awk instead of "cut| dc", you easily breach maximum allowed number of records in awk. Find all directories on filesystem containing more than 99MB Finds all directories containing more than 99MB of files, and prints them in human readable format. The directories sizes do not include their subdirectories, so it is very useful for finding any single directory with a lot of large files. Runs previous command replacing foo by bar every time that foo appears Very useful for rerunning a long command changing some arguments globally. As opposed to ^foo^bar, which only replaces the first occurrence of foo, this one changes every occurrence. Debug how files are being accessed by a process Instead of looking through lsof results, use inotifywait! looking for files not subversioned En entornos de desarrollos muchas veces se mezclan ficheros y debemos revisar si algo se nos ha quedado fuera del proyecto. Con esta linea de comando busco todos los ficheros que no sean M ( modificados ) para valorar si tengo que agregarlo al repositorio de subversion. Adem?s siempre se me olvida como usar un condicional con awk para una columna :D remote-pbzip2 and transfer a directory to local file use the real 'rm', distribution brain-damage notwithstanding The backslash avoids any 'rm' alias that might be present and runs the 'rm' command in$PATH instead. In a misguided attempt to be more "friendly", some Linux distributions (or sites/etc.) alias 'rm' to 'rm -i'. Unfortunately, this trains users to expect that files won't actually be deleted until they okay it. This expectation will fail with catastrophic results when they use other distributions, move to other sites, etc., and doesn't really even work 100% even with the alias. It's too late to fix 'rm', but '\rm' should work everywhere (under bash).

Find all the files more than 10MB, sort in descending order of size and record the output of filenames and size in a text file.
This command specifies the size in Kilobytes using 'k' in the -size +(N)k option. The plus sign says greater than. -exec [cmd] {} \; invokes ls -l command on each file and awk strips off the values of the 5th (size) and the 9th (filename) column from the ls -l output to display. Sort is done in reversed order (descending) numerically using sort -rn options. A cron job could be run to execute a script like this and alert the users if a dir has files exceeding certain size, and provide file details as well.