cannot delete folder
I copied root folder onto an external fat32 drive to back it up before changing partitions.
I can't get rid of the /dev folder. I whittled /dev down to /dev/fd/6. /fd is a link and all the files in it are links. I have found out that checking Properties of /media/disk starts some sort of loop that continues beyond what the actual system file gives. Deleting /media/disk/dev starts some sort of loop. rm -rfd /media/disk/dev as root, even though I am the owner, starts a loop until I "ctrl z" to stop the process. I also tried a live cd. I also tried with the drive connected to XP. ls -l gives the following. /media/disk # ls -l /media/disk/dev total 16 drwxr-xr-x 3 don root 16384 Jul 29 08:50 fd The 3 is different than the other files. What does that mean? |
Why do you need to delete the /dev directory? If it's a reasonably recent Linux distro this directory will be generated at boot by udev.
Also, *all* the file ownerships and permissions will be gone if you've backed up onto fat32, so doing a restore of the root partition will be a major headache. Dave |
Right Dave
I did not need any of the files after copying them. Now I am trying to remove them from my backup drive. All have been deleted except media/dev/fd/6/fd/6/fd/6/fd/6/fd/6/fd/6........and on it goes! (I am using suse 10.2_64) |
Try
Code:
rm media/dev/fd/6/ |
Tried
rm media/disk/dev/fd/6/ rm media/disk/dev/fd/6 rm media/disk/dev/fd/ rm media/disk/dev/ pilgrim2x:/media/disk/dev # rm * and other variations. They did not work. (error message) rm: cannot remove `(whatever)': Is a directory The loop is to directories. |
Yes, of course, it's a directory, you need to type
Code:
rm media/disk/dev/fd/6 |
Quote:
My system folder /dev/fd, like the folder that was originally copied, is a link to /proc/self/fd and has no folders in it and no 6 now of any kind. There are files 1 through 5 in it that are links to different things or files. The following is what I received: pilgrim2x:~ # rm /media/disk/dev/fd/6 rm: cannot remove `/media/disk/dev/fd/6': Is a directory pilgrim2x:~ # |
Quote:
Code:
pilgrim2x:~ # rm -rf /media/disk/dev/fd/6 use mc ? |
What about
Code:
rmdir /media/disk/dev/fd/6 |
Quote:
Code:
pilgrim2x:~ # rm -rfd /media/disk/dev/ [QUOTE=dxqcanada] Quote:
Quote:
I noticed what may be a clue this morning. I tried again to delete /media/disk/dev with konqueror file manager. In the delete dialog box, as the number of deleted folders was skyrocketing into the thousands, there were also hundreds of files building up. No files are ever displayed when clicking on /media/disk/dev, just folders: /media/disk/dev/fd/6/fd/6/fd/6/fd/6/fd/6/fd/6........and on it goes! Reminder: 500GB external drive, fat32 file system, have not been able to delete /media/disk/dev/ that I copied from /dev/. I appreciate the help. |
Since /media/disk/dev/fd/6 is not a symbolic link, you either have thousands of directories with the names you show above (maybe you created them by mistake) or the filesystem is corrupted (do a fsck or scandisk on it). I cannot think of another possibility at the moment. Did any error message appear when you were copying the files?
|
Quote:
If I had not jumped to conclusions I would have deleted /media/disk/dev/ long ago. Quote:
I was checking the drive again in XP. I notice that the folder was read only. On a lark I set to change the attributes to archive. Off it went on a seeming endless process. I was watching the path fly by in the dialogue box when in the blur at the end there seemed to be a 9! I stopped the process and opened /media/disk/dev/ in a fiemanager. Again, /media/disk/dev/fd/6/fd/6/fd/6..... 23 folders down, was /6 with folders named 9, 10, 11, 12, 13, 14, and 15 within. Within these folders were folders of folders with different numbers of folders with numerical names up to the low thirty's. On and on the branches (or roots) of the tree went. Every once in a while there would be two files together, sometimes named stderr and stdout or named 1 and 2 all with the same message. Something about icon paths if I remember correctly. Also, occasionally there were about 5 or 6 empty folders with the same names as some of the folders in the system folder /dev. Since, as you point out, these did not show to be linked, there must be an end to it and "rm -rfd /media/disk/dev/" should work. Out of curiosity I checked the properties of /media/disk/dev/ again using konqueror. This time I let it run. 2 3/4 hours later when konqueror locked up it showed 17290 files and 392261 sub-folders using 6+GB of space. Tiring of /media/disk/dev/ I then ran "rm -rfd /media/disk/dev/" and about 29 minutes later it was gone. I could have copied everything except /media/disk/dev/ and reformatted quicker, but it has been fun. Thanks again for the help. don |
All times are GMT -5. The time now is 02:36 AM. |