Commands by MyTechieself (2)

What's this?

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.

Share Your Commands


Check These Out

Function to create an alias on the fly
Is used like this: mkalias rmcache "rm -rfv app/cache/*"

which process has a port open

Mount proc
Run this in / in a chroot to get your own proc there.

Convert files from DOS line endings to UNIX line endings
Here "^M" is NOT "SHIFT+6" and "M". Type CTRL+V+M to get it instead. Its shortest and easy. And its sed!, which is available by default in all linux flavours.. no need to install extra tools like fromdos.

Enter a command but keep it out of the history
Put a space in front of your command on the command line and it will not be logged as part of your command line history.

Install pip with Proxy
Installs pip packages defining a proxy

identify exported sonames in a path
This provides a list of shared object names (sonames) that are exported by a given tree. This is usually useful to make sure that a given required dependency (NEEDED entry) is present in a firmware image tree. The shorter (usable) version for it would be $ scanelf -RBSq -F "+S#f" But I used the verbose parameters in the command above, for explanation.

Reset hosed terminal,
stty sane resets the tty to basic usable function. The ^J is a newline -- sometimes CR/LF interpretation is broken so use the ^J explicitly.

Check which files are opened by Firefox then sort by largest size.
Check which files are opened by Firefox then sort by largest size (in MB). You can see all files opened by just replacing grep to "/". Useful if you'd like to debug and check which extensions or files are taking too much memory resources in Firefox.

start a VNC server for another user


Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: