Deleting a number of hidden files with the same name

Hi,

I have until recently been using Personal Backup X3 to sync my files between my G5 and an external drive. However this has been creating a hidden file called .PBSyncDB in all the directories I'm backing up - and as such is appearing in certain applications and being a general nuiscence.

I have tried searching for all files with this name in the finder - even with hidden files being shown, but its no go. My only other hope is the terminal - but I have not a clue here. Can somebody please post the command to delete all files named .PBSyncDB?

Thanks in advance,

Paul

PowerMac G5 Dual 2.0GHz Mac OS X (10.4.4)

PowerMac G5 Dual 2.0GHz, Mac OS X (10.4.4)

Posted on Jan 17, 2006 4:58 PM

Reply
18 replies

Jan 18, 2006 11:33 AM in response to Andbrowny

I thought this sounded like a cool command, so decided to try it out on my Ttest folder, which is on my Desktop, and exists for the sole purpose of Trying Things. I decided to delete all the .DS_Store files. First I checked to see that they were found.

Type in

find

hit the space bar and then drug the Ttest folder into the Terminal window, released it, Terminal automatically fills in the correct path and helpfully adds a space at the end of the path. Next type

-name

hit the spacebar and type

"\.DS_Store"

and hit the Return key. A list of all the .DS_Store files is returned in the folder and all the sub-folders.

Repeat the above command, put a space after "\.DS_Store" and type

-exec

spacebar, then the brackets, space, slash and semi-colon, hit the Return key. The final command looks like this:

Tiger:~ francine$ find /Users/francine/Desktop/Ttest/ -name "\.DS_Store" -exec rm {} \;

All the .DS_Store files were gone. In your case, if you only want to search your home folder you drag 'n drop that folder into the Terminal after typing find and a space. Cool command Andbrowny! Thanks.

User uploaded file
Francine
Schwieder

Jan 19, 2006 12:20 PM in response to lloydyweb

Hi again, we may have to change tack here, in the terminal if you type defaults write com.apple.finder AppleShowAllFiles -boolean true; killall finder
Locate one of these pesky files and do a Get Info on it change the owner to yourself and try to delete it.
See if that works, if it does we may be able to add a chown to the command.
Cheers.
BTW to turn off defaults write com.apple.finder AppleShowAllFiles -boolean false; killall finder

Jan 19, 2006 12:55 PM in response to lloydyweb

If a command like

Tiger:~ francine$ sudo find /Users/francine/Desktop/Ttest/ -name "\.DS_Store" -exec rm {} \;

doesn't do it, and investigating the Ownership/Permissions issue doesn't help, it could be that the system immutable bit is set. See this article.

I have a vague memory of some file getting that set, and I think Michael Conniff wrote tip about it. Of course, I could be totally confused about this.

User uploaded file
Francine
Schwieder

Jan 24, 2006 7:12 PM in response to lloydyweb

Hi lloyd, the command should be sudo chown USERNAME path tofile
or for the path just drag the file into the terminal window.
enter your password when prompted and it should make the change. if you do the defaults write com.apple.finder AppleShowAllFiles -boolean true; killall finder command first it'll make it easier to drag the file and also get a getInfo on it to check the ownership etc.. Good Luck
Cheers

Jan 25, 2006 3:19 PM in response to Andbrowny

Thanks for your help so far Andbrowny,

I need to do the following:
- Change the ownership all hidden files named .PBSyncDB to me
- Then delete them.

Is there a way of combining all that you have told me thus far - either in two steps, or as one command?

For this file ownership is as follows:
Owner: System
Access: Read & Write

Group: fourtwo
Access: Read only

Others: Read Only

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.

Deleting a number of hidden files with the same name

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