This command allows you to find the effective uid and gid of the Apache process regardless of process name (which can be apache2 or httpd depending on distro).
So your boss wants to know how much memory has been assigned to each virtual machine running on your server... here's how to nab that information from the command line while logged in to that server Show Sample Output
Uses xargs to call the second grep with the first grep's results as arguments
Unless you have files that include 'svn' in them, this should provide enough information to be useful. If you need to be certain, add the leading dot in the search pattern
works in fedora, centos and presumably other distros that use chkconfig
less ressources (processes) needed Show Sample Output
Substitute that 724349691704 with an UPC of a CD you have at hand, and (hopefully) this oneliner should return the $Artist - $Title, querying discogs.com. Yes, I know, all that head/tail/grep crap can be improved with a single sed command, feel free to send "patches" :D Enjoy! Show Sample Output
This will tighten up security for your box. The default value for PermitRootLogin sadly is 'yes'.
This command, when run from the directory containing "filename", will remove the file and any hard or symbolic links to the file.
the result of the command helped a check the Maximum file size and Maximum file system size. EXT3 Exemple: Block size; MAX File size; Maximum file system size 1 KiB; 16 GiB ; 2 TiB 2 KiB ; 256 GiB ; 8 TiB 4 KiB ; 2 TiB ; 16 TiB 8 KiB[limits 1]; 2 TiB; 32 TiB Show Sample Output
Deletes capistrano-style release directories (except that there are dashes between the YYYY-MM-DD) Show Sample Output
This shows a list of channels from seeon.tv website to watch shows and movies
chrome only lets you export in html format, with a lot of table junk, this command will just export the titles of the links and the links without all that extra junk Show Sample Output
You can find every file with png extension and redirect its output to file. Later you can find a string inside the file.
Counts Mysql Threads mysql switches -N skip column names (remove headers) -s silent mode (removes separator chars) -r raw output -e execute grep switches -c count lines -v invert match (match all except) Show Sample Output
There's nothing particularly novel about this combination of find, grep, and wc, I'm just putting it here in case I want it again. Show Sample Output
First column is number of photos, second column is the focal length. Show Sample Output
tutorial @ http://www.regular-expressions.info/lookaround.html also see @ http://stackoverflow.com/questions/5080988/how-to-extract-string-following-a-pattern-with-grep-regex-or-perl for tip: `grep -Po 'name="\K.*?(?=")' file.txt` 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: