Curious about differences between /bin, /usr/bin, and /usr/local/bin? What should be in the /sbin dir? Try this command to find out. Tested against Red Hat & OS X
Quick and dirty version. I made a version that checks if a manpage exists (but it's not a oneliner). You must have ps2pdf and of course Ghostscript installed in your box. Enhancements appreciated :-)
RTFMFTW.
If you are already running screen then you often want to start a command in a fresh window. You use this alias by typing 's whatever' from your command line and 'whatever' starts running in a new window. Good with interactive commands like info, vim, and nethack.
You can convert any UNIX man page to .txt
Tested on Fedora 12. This function will take a man page and convert it to pdf, saving the output to the current working directory. In Gnome, you can then view the output with "gnome-open file.pdf", or your favorite pdf viewer.
e.g.
manswitch grep -o
This will take you to the relevant part of the man page, so you can see the description of the switch underneath.
Some commands have more information on 'info' than in the man pages
Would be better if gnome-open would accept std in Should be doable in KDE - anyone?
This works in bash. The "!!:0" limits the argument to man to be only the first word of the last command. "!!:1" would be the second, etc.
Example :
LC_ALL=C man less | less +/ppattern
Are there any creative pieces of music that can be created using beep and the shell? I'd love to hear it!
Simply pass an argument to the script to convert the manual page to a PDF:
man2pdf drutil
man -t manpagename gives a postscript version of said man page. You then pipe it to ls, and assuming you have cups set up, it prints in your default printer. Show Sample Output
Obviously, you can replace 'man' command with any command in this command line to do useful things. I just want to mention that there is a way to list all the commands which you can execute directly without giving fullpath. Normally all important commands will be placed in your PATH directories. This commandline uses that variable to get commands. Works in Ubuntu, will work in all 'manpage' configured *nix systems. Show Sample Output
Tested on debian and ubuntu. Translations could be useless, so "LANG=C man intro" is a better alternative.
Sometimes you don't have man pages only '-h' or '--help'.
Search manpages for a keyword. Very useful when you don't know where to find the information. Show Sample Output
Place the line above in your ~/.bahsrc file. Now every time you issue the 'vb' command, you invoke the vim editor to edit it, then source it so the changes take effect immediately. Notes: * This mechanism is not working well if your .bashrc contains commands that should not be sourced more than once. * This trick also work for your csh or tclsh users: place the following line in your ~/.cshrc file: alias vc 'vim ~/.cshrc; source ~/.cshrc Thank you adzap for pointing out the missing quote
Colourful with vim regex finding goodness! Replace the 'man' with the page to be looked up. I actually have as a function in my .profile function vman { /usr/bin/man $* | /usr/bin/col -b | /usr/bin/iconv -c | view -c 'set ft=man nomod nolist nospell nonu' -
Uses the formatting of a man page to show an outline of its headers and sub-headers. Show Sample Output
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.
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.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
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: