Find the source file which contains most number of lines in your workspace :) Show Sample Output
I've been using it in a script to build from scratch proxy servers. Show Sample Output
Computes factorials. Show Sample Output
Returns the '$1'th Fibonacci number. Show Sample Output
This is a shortcut to tar up all files matching a wildcard. Tar doesn't have the --include (apparently).
Here we instead show a more real figure for how much free RAM you have when taking into consideration buffers that can be freed if needed. Unix machines leave data in memory but marked it free to overwrite, so using the first line from the "free" command will mostly give you back a reading showing you are almost out of memory, but in fact you are not, as the system can free up memory as soon as it is needed. I just noticed the free command is not on my OpenBSD box. Show Sample Output
See how your system works with pendrives/mice/monitors/whatever-you-can-plug-in. Use cases: see on which /dev/... your peripherals are, find out if a specific udev rule is being applied correctly.
Simple and easy. No regex, no search and replace. Just clean, built-in tools.
This command will format your alias or function to a single line, trimming duplicate white space and newlines and inserting delimiter semi-colons, so it continues to work on a single line. Show Sample Output
only output the ip addres. I put double pipe with sed because not parse with operator OR (|) in redex. Show Sample Output
With no '-q 0' switch, nc simply waits, and whatever awaits the data hangs.
Change HH:MM with your target time. This is for a Debian/Ubuntu GNU system. You need bash (package bash), date (package coreutils) and toilet (package toilet). Install with: # apt-get install bash coreutils toilet toilet-fonts
Gives you an updating woot! item tracker! Show Sample Output
This will get the mac address of the eth0 and change lowercase to uppercase. The sed command removed the colons.
Simple bash/ksh/sh command to rename all files from lower to upper case. If you want to do other stuff you can change the tr command to a sed or awk... and/or change mv to cp....
To start, you first need to make sure updatedb has been run/updatedb, and initialized the db:
su -l root -c updatedb
This locate command is provided through the mlocate package, installed by default on most GNU/Linux distributions. It's available on the BSDs as well. Not sure about support for proprietary UNIX systems. The output is self-explanatory- it provides an overview of how many directories and files are on your system.
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: