Well, I screwed up my external hard drive and now everything is in the lost+found folder. I can barely look through it because there is several tens of thousands of files (buncha inode things) and a lot of empty folders. My question is, is there anyway I can get straight to the video, audio, and image files that are strewn across these folders?
|
feedback
|
|
I am not sure how (or even if) you could recover the original location of all the files. But at the very least you could start sorting them based on the content. For starters, rox (aka Rox-Filer) is not dependent on file name extensions to know file type (it uses the actual file contents), so if you want a point and click browser that will open the files for inspection with the right app regardless of filename, I would try rox if Nautilus isn't working. If the problem with Nautilus is that the size of the directory is making it hard to use, in my experience rox works pretty well with huge directory listings as well (just be sure preview is turned off for images and video). On the command line, the Edit Here is something that may be helpful, I tested this on some copies of various files without the three letter filename extensions, so I know it works. It should be easy to check the output of file for various items to add clauses (and of course you will want to change the destination directories for all of this):
#!/bin/sh
mkdir -p ~/test-imgs;
mkdir -p ~/test-vids;
mkdir -p ~/test-music;
for i in $*
do
( [ -n "`file $i | grep image`" ] && mv $i ~/test-imgs ) ||
( [ -n "`file $i | grep video`" ] && mv $i ~/test-vids ) ||
( [ -n "`file $i | grep Audio`" ] && mv $i ~/test-music ) ||
( [ -n "`file $i | grep III`" ] && mv $i ~/test-music )
done
| |||||
feedback
|