WalaWiki content from p1k3.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

15 lines
1014 B

UnixTools. Lists open files.
* [http://dmiessler.com/study/nix/commands/lsof/ dmiessler piece on lsof]
Scenario: You have a limited timeframe in which to make a mix CD. A couple of the songs you want to use are available to you only on an iPod. You're borrowing a Mac and an iTunes installation, so you don't just want to do a wholesale import into iTunes of all those randomly named files in the hidden data directory on the iPod. Quick, how do you identify just the files you need?
This sounds contrived, and I don't doubt there are a bunch of tools out there to deal cleanly with the iPod filesystem/db, but I had this come up yesterday and thought gosh, I wonder if lsof is available on the Mac. Sure enough,
lsof | egrep 'm(p3|4a|4p)'
# or if you know filetype...
lsof | grep 'mp3'
while playing a track off a connected iPod will give you what you're looking for.
Of course, this kind of thing wouldn't be necessary if Apple were in the business of treating their customers like adults.