du: Can't follow symlink cycle from /dev/fd/3 to /dev/fd/3

I posted this on Dec 27, 2009 12:41 AM in the Snow Leopard Board and got the hint that this might be a better place for questions like this. Sorry for cross posting - I will put a hint in the other thread to answer here.

Hello,

I found this strange behaviour on a fresh installation of Snow Leopard on a new MacBook. I then tried as well on my own older MacBook and got the same result. I guess, it should not be like that but found no negative impact otherwise until now. I wonder whether this is intended behaviour? I can hardly believe.

Bye, Christian Völker

bash-3.2$ sudo du -h -d 1 /
Password:
1,1M /.fseventsd
1,6G /.Spotlight-V100
0B /.Trashes
0B /.vol
11G /Applications
3,9M /bin
0B /cores
du: Can't follow symlink cycle from /dev/fd/3 to /dev/fd/3
bash-3.2$ ls -la /dev/fd/3
ls: /dev/fd/3: Bad file descriptor
bash-3.2$ ls -la /dev/fd/
total 0
crw--w---- 1 cvoelker tty 16, 0 27 Dez 09:34 0
crw--w---- 1 cvoelker tty 16, 0 27 Dez 09:34 1
crw--w---- 1 cvoelker tty 16, 0 27 Dez 09:34 2
drw-rw-r-- 58 cvoelker staff 1972 26 Dez 16:40 3
dr--r--r-- 1 root wheel 0 26 Dez 10:21 4

I posted the same issue to a german board, called the machackers and got an answer form somebody, who agreed with me that Apple just forgot to clean up the cruft when creating the installation routines or created during installation routines. He suggested to try and remove the /dev/fd/3 and /dev/fd/4. However, he did not try on his own, so I did not yet follow this advice.

Bye, Christian

MacBook, Mac OS X (10.6.2)

Posted on Dec 27, 2009 2:17 PM

Reply
2 replies

Dec 28, 2009 8:28 AM in response to xnav

Thank you for this hint.

I knew that the /dev tree serves special purposes although I did not know all the details presented in this thread.

What I really stumbled about, was, that I have been able to use the command "sudo du -h -d 1 /" as admin to learn about the usage of my hard disk. Meanwhile I learned that I still get reasonable results when adding the option -x, but something has changed here.

After having read the other thread, I get the impression, that the way du operates has changed actually, not the /dev file system. But still then, I guess this is not an enhancement. For me, something that worked fine for years feels like broken now.

Actually, it made decide to completely reinstall the MacBook of my father during christmas. I would have had ideas on who to spend this time differently. My christmas gift to him was an audiobook bought in the iTunes Store, but he was not able to load it on his new MacBook, less then one month old. The error message indicating a permissions problem was completely misleading and plain wrong. So I investigated the issue further, created a new user account, which did not solve the problem either. Later on, I found the issue described here which made me believe that the whole operating system was screwed up. As I spent so much time with repairing this, I am eager to understand what was wrong here, although it does not have a practical impact any more.

Bye, Christian

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.

du: Can't follow symlink cycle from /dev/fd/3 to /dev/fd/3

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