-sl : show just file names
Fast and excludes words with apostrophes. For ubuntu, you can use wamerican or wbritish dictionaries, installable through aptitude. Show Sample Output
Helps if you accidentally deleted files from an svn repo with plain rm and you would like to mark them for svn to delete too.
since awk was already there one can use it instead of the 2 greps. might not be faster, but fast enough
Uses sed with a regex to move the linenumbers to the line end. The plain regex (w/o escapes) looks like that: ^([^:]*):(.*) Show Sample Output
Gets the current system user running a process with the specified pid Show Sample Output
Tested in bash on AIX & Linux, used for WAS versions 6.0 & up. Sorts by node name. Useful when you have vertically-stacked instances of WAS/Portal. Cuts out all the classpath/optional parameter clutter that makes a simple "ps -ef | grep java" so difficult to sort through. Show Sample Output
you can find a special things(with defined -iname "*sql*") from in most of one direcroty(for example from both /etc/ and /pentest/) and then you can want to grep only include "map" word Show Sample Output
This command displays the CPU idle + used time using stats from /proc/stat. Show Sample Output
Find is used to "find" all filenames - grep shows those that are invalid.
Find all files under "." that are invalid NTFS filenames. Find locates all files, and grep shows the invalid ones.
Use this command if your file may contain empty lines and you need to optain the first non-empty line.
Kill all process that concide whit PATTERN Show Sample Output
See who is using a specific port. Especially when you're using AIX. In Ubuntu, for example, this can easily be seen with the netstat command. Show Sample Output
Not figured by me, but a colleague of mine. See the total amount of data on an AIX machine. Show Sample Output
Removes comments and blank lines from configuration files, leaving only settings
You don't need to use "*", it will fail if the working directory has too many fails due parameter extension, you can simply pass the working directory using ".".
You don't need to use "*", it will fail if the working directory has too many fails due parameter extension, you can simply pass the working directory using ".".
Reciprocally, we could get the node name from a give Tor IP address => ip2node() { curl -s -d "QueryIP=$1" http://torstatus.blutmagie.de/tor_exit_query.php | grep -oP "Server name:.*'>\K\w+" ; } ip2node 204.8.156.142 BostonUCompSci Show Sample Output
the
find -printf "%f\n" prints just the file name from the given path. This means directory paths which contain extensions will not be considered.
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: