More Terminal tidbits

fs_usage – somewhat like Systinternals’ Filemon, this command shows you a realtime list of all the filesystem activities – like what files are being accessed on your system along with the names of the applications that are accessing them. If you are seeing a lot of filesystem activity but are not sure what is causing it this tool can help you narrow it down to a specific application. Run it as root (sudo) otherwise it won’t work.

You might also want to look at lsof.

pbcopy – reads from stdout and copies the output to clipboard. Similar to what clip does on Windows. e.g.

ls | pbcopy

will paste the output of ls to clipboard.

pbpaste – does exactly the opposite of pbclip, i.e. pastes the contents of clipboard to stdout which you can then pipe through other commands. e.g.

pbpaste | sort -r

open – finally a command that you can use to launch a file/application – e.g.

open .

will open the current folder in Finder.

blog comments powered by Disqus