I was working with many small files (about 1million) and for one reason or another had to create a bunch of hard links to them. Now I am trying to delete all this data, but can't. After removing the 'original' files, the hard links remain and can not be changed:
bash-3.2$ rm -rf a
rm: a: Directory not empty
bash-3.2$ sudo rm -rf a
Password:
rm: a: Directory not empty
bash-3.2$ cd a
bash-3.2$ ls -la
[...]
ls: 82395-8.jpg.txt: No such file or directory
ls: 82395-9.jpg.txt: No such file or directory
ls: 824-1.jpg.txt: No such file or directory
ls: 824-10.jpg.txt: No such file or directory
ls: 824-2.jpg.txt: No such file or directory
ls: 824-3.jpg.txt: No such file or directory
ls: 824-4.jpg.txt: No such file or directory
ls: 824-5.jpg.txt: No such file or directory <-
total 0
drwxrwxrwx 32114 ma staff 1091876 4 Mai 11:13 .
drwxrwxrwx 3 ma staff 102 4 Mai 11:04 ..
bash-3.2$ vim 824-5.jpg.txt
~
~
~
~
"824-5.jpg.txt" [New File] <-
-> enter some text
:wq!
bash-3.2$ vim 824-5.jpg.txt
-> text was saved
bash-3.2$ rm -rf 824-5.jpg.txt
bash-3.2$ ls -la
ls: 824-3.jpg.txt: No such file or directory
ls: 824-4.jpg.txt: No such file or directory
total 8
drwxrwxrwx 32115 ma staff 1091910 4 Mai 11:23 .
drwxrwxrwx 3 ma staff 102 4 Mai 11:22 ..
-rw-r--r-- 1 ma staff 7 4 Mai 11:23 824-5.jpg.txt <-
bash-3.2$ rm -rf 824-5.jpg.txt <-
ls: 824-4.jpg.txt: No such file or directory
**ls: 824-5.jpg.txt: No such file or directory**
total 0
drwxrwxrwx 32114 matthi staff 1091876 4 Mai 11:24 .
drwxrwxrwx 3 matthi staff 102 4 Mai 11:22 ..
bash-3.2$ ls
Using the finder just leads to an error when I try to empty the trash. What can I do? This is taking >100GB of my hard disk and I'd really like to reclaim the space.
برچسب:
نویسنده: استخدام کار