What does 'rm .*' do?

I just got an iMac a few days ago and noticed that when I drag files from a flash drive it does not free up any memory. So, I went online somewhere that showed how to use 'rm' in the Terminal to remove the hidden .trashes folder from the flash drive.

Fortunately, I did not go through the entire process, but I did accidently type in "rm .*" without first specifying a drive or a directory. When I entered it, it displayed ".Trashes cannot be removed".

This makes me think that everything except for .Trashes was deleted in some random directory, but it doesn't make sense that someone could delete anything without first specifying a folder/drive.

By the way, I learned just yesterday that emptying the trash deletes those hidden files. Anyway, I'll let you get back to reading more interesting posts.

2.66 GHz iMac, Mac OS X (10.5.2)

Posted on May 19, 2008 6:06 PM

Reply
5 replies

May 19, 2008 6:21 PM in response to jeremy27

It will have deleted any file for which you are the owner that began with a period. It most likely ran in your home directory (the default directory when opening the terminal), but luckily most of those files are created by specific applications upon use and therefore will be replaced the next time you run the application. The "." before the file/folder name just hides the item, and if you're concerned about hidden folders, the way you ran the "rm" command will not delete folders so any hidden folder would not have been touched.

The only hidden file I can think of in the home folder that the system uses is the .DS_store file, which contains custom folder information for displaying the folder's contents. The Finder will replace this file if it's needed.

May 19, 2008 11:57 PM in response to jeremy27

{quote}
I just got an iMac a few days ago and noticed that when I drag files from a flash drive it does not free up any memory.





After you dragged the files from the device to the trash, you empty the trash as usual. This should free up the space on the device. It's the same for all mounted devices like external hard drives. Each device has it's own trash folder, but they all get emptied if they are mounted when you empty the trash.

If this isn't working you've got other problems than dealing with a terminal command.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

What does 'rm .*' do?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.