useful if you want to start running a svc as a non-privileged user instead of root.
This comes in handy for me when I am developing and testing Perl command line scripts. http://technet.microsoft.com/en-us/library/bb490880.aspx
Use this as a quick and simple alternative to the slightly verbose "du -s --max-depth=1" Show Sample Output
Easily convert units of similar measurement. May also be invoked alone, units. Show Sample Output
The regular expression matches patterns of .c, .cpp, .C, .Cpp, .h, .hpp, .H, .Hpp. The matched files are piped through etags to create a TAGS file, useful for emacs. Alternate regex (if you aren't worried about capital .Cpp) is -regex ".*\.c\|.*\.cpp\|.*\.h"
Function to remove a specified path from your PATH environment variable. Show Sample Output
Be careful when issuing this command, it may kill unwanted processes! To only search on the process name don't use the argument -f, pkill foo Show Sample Output
Probably posted previously, I use this all the time to find and kill a process for "APP". Simply replace "APP" with the name of the process you're looking to kill.
the newest rpms are at the top; individual packages can also be queried this way: rpm --last -q package
vimdiff to remotehost Show Sample Output
example: -------------------------------------------------------------------------------------------- user@ubuntu:~/workspace/SVN/haystak-repos/trunk/internal/src$ addpi -------------------------------------------------------------------------------------------- Now that directory is in the list of fast access directories. You can switch to it anytime like this: -------------------------------------------------------------------------------------------- user@ubuntu:~$ pi internal` user@ubuntu:~/workspace/SVN/haystak-repos/trunk/internal/src$ -------------------------------------------------------------------------------------------- Please note the backquote ( the symbol that shares its key with ~ in the keyboard ) pi will switch you to that directory. To see the list of all fast access directories you have to say "cat ~/.pi"
Want to show something on your machine to someone over the web? Don't copy it or upload it somewhere. Just run "webshare" and the current directory and everything beneath it will be served from a new web server listening on port 8000. When your pal is finished, hit control-c. Found at www.shell-fu.org/lister.php?id=54
Uses lsof to list open network connections (file descriptors), grepping for only those in an established state
remotely connects to an https site, fetches the ssl certificate and displays the valid dates for the cert
rename a pattern matched files by stripping off the extension
Rather than chain a string of greps together and pipe them to awk, use awk to do all the work. In the above example, a string would be output to stdout if it matched pattern1 AND pattern2, but NOT pattern3.
quick in directory backup of all files in this directory. Adds the .bak extension to all copies.
I like to make it an alias in my .bashrc file, as such: alias psme='ps -ef | grep $USER' 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: