I don't like doing a massive sort on all the directory names just to get a small set of them. the above shows a sorted list of all directories over 1GB. use head as well if you want. du's "-x" flag limits this to one file system. That's mostly useful when you run it on "/" but don't want "/proc" and "/dev" and so forth. Remember though that it will also exclude "/home" or "/var" if those are separate partitions. the "-a" option is often useful too, for listing large files as well as large directories. Might be slower.
The -a option in -aEio tells grep to treat binary files as text files. Show Sample Output
Inner "ps...grep..." command searches for a process matching the specified . "lsof -p lists all file descriptors owned by . Includes open files, sockets, devices, etc... Show Sample Output
Counts of messages by recipient, with frozen messages excluded. Show Sample Output
Required : information_schema ** Only replace the "DB-NAME" and "PREFIX" with your DB-name and wildcard prefix match. ** Also replace with your own username and password for mysql server. This command uses the information_schema to wildcard match tables that we donot need from a database and than pipes the remaining tables out through "xargs" command to the mysqldump utility which than dumps those remaining tables into a sql dump file. Show Sample Output
This has saved me many times while debugging timeout issues to "too many open files" issues. A high number of the order of thousand, indicates that somewhere connection is not being closed properly. Show Sample Output
This command will help you to get Ip address origin of city and country. I will be happy if someone can shrink the sed command fb.me/josenirmal Show Sample Output
Goto phase 2 to clobber the interrupt that is problematic. Show Sample Output
I use this with alias: alias lsl="ls -1F | grep @ | sed 's/@//' | column"
I use this with alias: alias lsl="ls -1F | grep @$ | sed 's/@//' | column" Limitation: This will also list files that happen to have an @ at the end of the filename.
This shows all process (-e) and threads (-L) in full format (-F) Show Sample Output
Find mac address only from drivers, without using ifconfig. Show Sample Output
becuase im lazy and cant be bothered looking at the tv guide to choose a channel , any improvments or comments appreciated
Pipes the header row of ps to STDERR, then greps for the command on the output of ps, removing the grep entry before that. Show Sample Output
List system current active ip address Show Sample Output
Solves these pesky errors you see in the Apache log: [Fri Jun 28 17:51:00 2013] [emerg] (28)No space left on device: Couldn't create accept lock (/monsoon/opt/apache2/logs/accept.lock.356) (5) Naturally, can be used to get rid of other semaphores. Note: change the apache user in accordance to your ENV. Show Sample Output
This will find all the -Xmx[BIGINT] running on a system, add them up for you and give you the total. 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: