Previous 1 2 Next 16 Replies Latest reply: Dec 3, 2007 5:31 AM by jrg_uk
omninerd Level 1 (0 points)
I installed OS 10.5 as an upgrade. After a day, I decided to reinstall with the archive and install option. However, I had already backed up my system with Time Machine. So I have this directory on my second hard disk:

drwxr-xrwx+ 3 root myusername 102 Oct 29 19:31 Backups.backupdb

I noticed the + and removed the ACL with sudo. However, I still cannot remove the folder with: sudo rm -rf Backups.backupdb. I get "operation not permitted" on all attempts. Dragging the folder to the trash yield similar results. *What is the Terminal (bash) way to delete this folder?*

Also, I noticed all sub-directories have an @ symbol, like this:

0 drwxr-xr-x@ 12 root myusername 408 Oct 30 15:59 mycomputer

*What does the @ mean?*

Power Mac G5, Mac OS X (10.5)
  • BrianH Level 4 (1,835 points)
    if you re-installed wouldn't you want to just format your TM hard drive and let it set it up fresh again?
  • omninerd Level 1 (0 points)
    Brian, I'm only interested in solutions that involve deleting the directory and all sub-directories without formatting the drive. Thanks for the tip though.
  • Bob White Level 1 (75 points)
    The @ is covered in the "man ls" under Leopard. I can't remember what it stands for cause I am on Tiger right now and "man ls" does not mentiion it.

    My opinion, which may not be worth much, is that if "rm -fr" doesn't do it. Then there is no way that finder or any of its stuff such as Trash Can will work either.

    In my case, I just reformatted. However, you might try booting from the Install Disk (especially a Tiger one) and running the "rm -fr" from there. Tiger might not understand the directory where Leopard will and maybe there is some connection when the installed Leopard is active. Anyway, it is just a thought. Hope that helps.
  • OS Lucinity Level 1 (40 points)
    You drag & drop the 'Backups.backupdb' folder on your External HD into the trash. Then click 'Empty Trash'.
  • mscheidell Level 1 (115 points)
    Since Time Machine backs up your entire systems folder you'll need to hold down the Option key while selecting Empty Trash. There are certain files, bootx, etc. that can only be deleted from Trash using this option. I just deleted my original TM backup folder and this was what it was asking before it would empty the trash entirely.

    If you do have problems getting the folder to go to Trash, make sure that you have turned off TM and selected another drive\folder for it's location.
  • omninerd Level 1 (0 points)
    Ah, I see it. From "man ls":

    +If the file or directory has extended attributes, the permissions field printed by the -l option is followed by a '@' character. Otherwise, if the file or directory has extended security information, the permissions field printed by the -l option is followed by a '+' character.+

    Doing ls -la@e results in:
    0 drwxr-xr-x@ 12 root myusername 408 Oct 30 15:59 mycomputername 18
    0: group:everyone deny addfile,delete,add_subdirectory,deletechild,writeattr,writeextattr,chown

    Now if I can just figure out how to recursively bypass the additional security I'll be set.
  • BrianH Level 4 (1,835 points)
    Go to the Finder then enter Time Machine.

    Navigate to the backup folder then click on the "cog wheel" on the finder bar and choose:

    "Delete All Backups of ..."

  • omninerd Level 1 (0 points)
    Interesting, but that didn't seem to do anything. Even if these cool GUI methods worked, I'd really like to understand the command line method, i.e., the underlying command at the file system level to kill this folder. I guess I just need to find some docs to figure out how to recursively shut off the additional file attributes on this directory tree. This is my first experience with something that the root user cannot delete (i.e., sudo).
  • Bob White Level 1 (75 points)
    Omninerd, when you figure it out, I would be interested in what you found. I, too, have never run into anything that "sudo rm -fr" would not get rid of.
  • Bob White Level 1 (75 points)
    I found a page that contains a program to list extended attributes. HTH
  • Bob White Level 1 (75 points)
    I booted into Tiger and deleted the Backup file by dragging it to trash and emptying the trash, but that did not release the 16gig that was being used by TM. So, I found the files in ".HFS+\ Private\ Directory\ Data^M" and did a "sudo rm -fr /Volumes/laCieDisk500A/.HFS+\ Private\ Directory\ Data^M/". That released the disk space. I just do not know what the further implications/problems that that causes. I am not worried since I can reformat that drive at any time. HTH
  • besson3c Level 1 (10 points)
    I found a solution here...

    sudo fsaclctl -p /Volumes/<yourVolume> -d

    Will disable ACLs on your backup volume. Then you can do a:

    cd /Volumes/<yourVolume>/Backups.backupdb/<yourMachine>
    sudo find . -maxdepth 1 -ctime +1 -exec rm -rfv {} \;

    To delete all backups created more than a day ago (or substitute any other 24 hour period as an argument for ctime)
  • cwolf Level 1 (35 points)
    rm is not aware of directory hard links. Removing files from within your backup using command line tools may result in more than you bargained for being deleted.
  • Bob White Level 1 (75 points)

    Thanks for the note on fsacictl. Since I never use acl's, I was not aware of it.

    I have a dmg that contains a copy of Leopard after I installed it and made some mods of my own. That way, I can play with Leopard and restart back at a known state if I wreck anything. Anyway, I had a TM backup and decided that for now I am not interested in TM since it looks like it may have problems with external drives. So, I found that Disk would not allow me to repartition the drive, probably because of the ".HFS+ Private Directory" or something like that which is where the TM backed up data resides. However, I had no problem using Disk in erasing the partition and changing the volume name. I had no other data on the drive. So, a full erasure did not bother me.

    When I was poking around on the TM drive, I found that the data files were being kept in that ".HFS+..." directory within lots of subdirectories and it looked like only indices were in the Backup.backupd subdirectory. I don't know why it worked for me, but I had no problem doing a "sudo rm -fr Backup.backupd". When I did that I noticed that none of the gigs of disk space were released and that it is when I started poking around and found the data in the ".HFS+..." directory. Which is when I then used Disk to erase the drive.

    Anyway, a little long winded, HTH
Previous 1 2 Next