Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'additional info that might help' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
additional info that might help
Authored by: fracai on Jun 15, '05 12:30:36PM
This hint could use some explaining as to what is actually going on here.

lsof is "LiSt Open Files" man lsof for more info basically, it lists out all files that are in use by open apps, background tasks, etc

grep searches for matches so grep mdimport is looking for the task that updates the Spotlight index

grep /Users/`whoami` could be replaced by grep /Users/ whoami reports your logged in user name and putting this in back tics runs the command before executing the grep command
an even easier way would be to run grep ~/ the ~/ expands to the location of your home folder

so in sum:

this command lists files currently being indexed for the Spotlight database, limited to files that are under your home folder

this will not list out corrupt files.

if you're experiencing trouble or slow speed with Spotlight, this might show you that Spotlight is spending a lot of time trying to index a very large or corrupt file (ie. run the command several times and if the same file is listed or anything that is listed appears odd (odd as in "oh, that corrupt file from last week") you might be able to solve your Spotlight trouble)

problems with indexing files could be anything from permissions to an excluded directory path

---
i am jack's amusing sig file

[ Reply to This | # ]

additional info that might help
Authored by: jaysoffian on Jun 15, '05 01:51:26PM
And perhaps a "better" way to do this is:

lsof -c mdimport -a ~
Although I admit half the time I can't remember lsof's options either (and its man page is awful), so I often resort to grep as well. But in this case, it only took a moment to find the correct options and if you're going to share a hint with others, it's worth the extra effort, don't you think? :-)

[ Reply to This | # ]
additional info that might help
Authored by: adrianm on Jun 16, '05 03:36:23AM
That doesn't completely work.

That is saying the command must be mdimport AND it must be your home directory - but not the contents.

You probably want this:


lsof -c mdimport -a +D ~
Which matches the contents of the home directory, but that, as the man page says is very slow, so maybe a compromise is order:

lsof -c mdimport | grep /Users/yourusername
Maybe you should have spent a bit more time reading the lsof man page :-)

[ Reply to This | # ]