Opens all files in the index (modified plus not added yet) in tabs in vim.
top 10 of access log
This one has a better performance, as it is a one pass count with awk. For this script it might not matter, but for others it is a good optiomization.
Display all pid less the 300 processes info
Rename all files in current directory by names from text file 'zzz'
I use this one-liner to search my sourcecode to find out where tags are named and since there's no easy way in XCode to see what values have already been used. Show Sample Output
NOTE: When doing these commands when asked for questions there might be flowing text from the pv doing the progress bar just continue typing as if its not there, close your eyes if it helps, there might be a yes or no question, type "yes" and ENTER to it, and also it will ask for a password, just put in your password and ENTER I talk alot more about this and alot of other variations of this command on my site: http://www.kossboss.com/linuxtarpvncssh 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
I used this to get all the remote connection ip addresses connected to my server... I had to start storing and tracking this data so thats why i built this out... probably not optimal as far as the egrep regex but it works ;) Show Sample Output
Use awk to sum and print the space used by a group of files. It works well as long as the space used is not bigger than 79094548.80... I found that upper limit when trying to find out what was the total amount of recoverable space from a set of directories: user@servername:/home/user/scripts>for dirName in aleph_bin aleph_sh aleph_work dailycheck INTERFAZ ; do echo "${dirName} = $(cat /tmp/purge_ocfs_dir.*.log | awk '{sum+=$5} END {printf "%4.2f", sum}') "; done aleph_bin = 79094548.80 aleph_sh = 79094548.80 aleph_work = 79094548.80 dailycheck = 79094548.80 INTERFAZ = 79094548.80 In the worst case scenario, the total number might be almost 137G. user@servername:/home/user/scripts>df -h /ocfs/* Filesystem Size Used Avail Use% Mounted on //argalephfsprod/aleph_bin$ 137G 38G 99G 28% /ocfs/aleph_bin //argalephfsprod/aleph_sh$ 137G 38G 99G 28% /ocfs/aleph_sh //argalephfsprod/aleph_work$ 280G 135G 146G 49% /ocfs/aleph_work //argalephfsprod/dailycheck$ 137G 38G 99G 28% /ocfs/dailycheck //argalephfsprod/INTERFAZ/ 137G 38G 99G 28% /ocfs/INTERFAZ Any suggestion about how to get the correct amount of space for total over 80 Mbytes? Show Sample Output
perhaps you should use CMD[$2] instead of CMD[$4] Show Sample Output
alias h="history | awk '{\$1=\"\";print substr(\$0,2)}'" # h [ 07/07/2013 10:04:53 ] alias h="history | awk '{\$1=\"\";print substr(\$0,2)}'"
dumpfile is a CSV file, which its 1st field is a phone number in format CC+10 digits Empty lines are deleted, before the output in format "prefix,ocurrences" Show Sample Output
find the uptime and convert in minutes, works with AIX and Linux too Show Sample Output
This will strip out the relivent disk information from kvm. I'm using it to find disks on a SAN which are no longer in use. Show Sample Output
becuase im lazy and cant be bothered looking at the tv guide to choose a channel , any improvments or comments appreciated
List system current active ip address 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: