JustinChase Posted October 3, 2014 Share Posted October 3, 2014 Short story is this. I had some serious hard drive problems, I seem to have most of that resolved now, but now I have a lot of files that have . in front of the file name and .asdfokex at the end of them. for example movie .name.mkv.2lkxvels I believe the . at the beginning means it's hidden I suspect these are files that were in the process of being moved when bad things happen. Regardless of how it happened, how do I find and eliminate all these files, which are spread all over my folders on several hard drives? Quote Link to comment
jphipps Posted October 3, 2014 Share Posted October 3, 2014 You can find them using find, similiar to: find /mnt/user/ -name ".*" -print In theory, you can use: find /mnt/user/ -name ".*" -exec rm {} \; I am always a bit worried about mass delete scripts, so i might just build a file of rm commands so I can verify what is happening. From a shell: find /mnt/user/ -name ".*" -print | while read x do echo "rm ${x}" >> mydeletefiles done Then your mydeletefiles will just be alot of rm (delete commands) you can verify and then run if you are happy with the list... Quote Link to comment
JustinChase Posted October 5, 2014 Author Share Posted October 5, 2014 Finally had a chance to work on this. Your idea worked great. There were less than I feared, so I was able to delete them manually without too much trouble. thanks again! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.