Commands by knathan54 (1)

  • whereis (1) - locate the binary, source, and manual page files for a command Not actually better, just expanded a bit. The "whereis" command has the following output: whereis gcc gcc: /usr/bin/gcc /usr/lib/gcc /usr/bin/X11/gcc /usr/share/man/man1/gcc.1.gz therefore the 'ls' error on first line, which could be eliminated with a little extra work. Show Sample Output


    0
    ls -l `whereis gcc`
    knathan54 · 2011-11-15 19:45:08 5

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.

Share Your Commands


Check These Out

Run a command only when load average is below a certain threshold
Good for one off jobs that you want to run at a quiet time. The default threshold is a load average of 0.8 but this can be set using atrun.

fetch all revisions of a specific file in an SVN repository
exported files will get a .r23 extension (where 23 is the revision number)

Most simple way to get a list of open ports

Shows what processes need to be restarted after system upgrade
This command can be installed in debian by the package debian-goodies. It also outputs the /etc/init.d/ commands that you need to do.

take a look to command before action
add |sh when you agree the list, I often use that method to prevent typos in dangerous or long operations

Clone /
Clone linux installation.

Mount Fat USB with RWX
after that, you can launch bash script in your usb drive in FAT32.

Backup all MySQL Databases to individual files

Open a manpage in the default (graphical) web browser
An easy alias for opening a manpage, nicely HTML formatted, in your set internet browser. If you get a "command exited with status 3" error you need to install groff.

Translate your terminal into Swedish Chef
Bork, bork, bork! To keep it short, the first terminal line doesn't show a prompt.


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.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

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: