2

Somehow a folder from /var/folders (/var/folders/2j/8_50ggln3wz21k4gmfx86drh0000gn/T/ on my machine) got 65535 links to it. This caused my machine to not boot anymore. I managed to fix the booting issue my renaming it to something else (mv T X) in recovery mode.

The problem is I can't get rid of it (rm -rf or even ls on it hangs).

ls -tahl ~/.Trash
total 0
drwxr-xr-x+    67 <user>  staff   2.1K Nov 30 00:30 ..
drwxr-x---  65535 <user>  staff   139M Nov 29 22:14 X
drwx------      3 <user>  staff    96B Nov 29 22:01 .

And if I try:

rm -r ~/.Trash/X
...(hanged, does not return)
  • Are you giving it enough time when it “hangs”? How are you determining that it’s “hung” vs “just taking a really long time”? – Tyson Nov 30 '17 at 1:17
  • I let it run for 1 hour+. the folder has only 139MB. Also, empty trash takes a long while and does not do anything – Radu Gancea Nov 30 '17 at 1:21
  • Please don't crosspost to multiple SE sites. Pick one & stick to it. superuser.com/questions/1272973/… – Tetsujin Nov 30 '17 at 5:20
  • Managed to remove the folder. I've used verbose mode and saw the progress – Radu Gancea Nov 30 '17 at 8:38
1

Wow. I suggest trying the following:

cd ~
sudo find ./.Trash/X -delete

If that stalls out, then try:

cd ~
sudo rm -rf ./.Trash/X/*
sudo rm -f ./.Trash/X/*
sudo rm -rf ./.Trash/X

If that triptych also fails, then I would like to see the output of

sudo stat -x ./.Trash/X

Hope that this helps,

F.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .