Question : How to remove hidden files in several folders (OS X 10.5)

We use OS X 10.5 for our file server, in an attempt to copy the files for one server to another, all files in the server had a 4kb hidden file created - i.e. identical file name, but only 4kb and the filename prefix is ". " pls see screen shot.

I do not know if the hidden files are used by POSIX access rights control or due to some freak tool we used to copy/sync the folders.

Does anyone know of a unix script or command I can use to delete all these ". " from all the folders?

thanks
 

Answer : How to remove hidden files in several folders (OS X 10.5)

try this:

first do a listing to make sure that these are the files you want to delete

find /path/to/parentdir -type f -name '. *'

second do the actual removal

find /path/to/parentdir -type f -name '. *' -exec rm {} \;

OR

find /path/to/parentdir -type f -name '. *' | xargs rm
Random Solutions  
 
programming4us programming4us