3 ms·
On ElCapitan: sh-3.2# pwd /var/root sh-3.2# ln -s ftw $str1/$str2/$str3/$str4/L ln: 1.../2.../3.../4.../L: File name too long
by self_awareness 11y ago
On ElCapitan:
sh-3.2# pwd
/var/root
sh-3.2# ln -s ftw $str1/$str2/$str3/$str4/L
ln: 1.../2.../3.../4.../L: File name too long
- newhouseb 11y agoYay, that's actually the right error. MAX_PATH in xnu (the OS X kernel) is 1024 so it's not unsurprising that things get weird when you have paths at least 1025 characters long as in his example.
- avz 11y ago> MAX_PATH in xnu (the OS X kernel) is 1024 so it's not unsurprising that things get weird when you have paths at least 1025 characters long as in his example. What is surprising is the asymmetry: you can create the symlink, but cannot remove it.
- 0x0 11y agoIf you make a directory tree "a/a/a/a/a/a/a" and then rename every directory to "aaaaaaa (x255)" starting on the inner directory... How does other OSes deal with this? Does every rename at a top level folder check the filenames recursively first?
- robinhouston 11y agoThat’s interesting. I’m on El Capitan too (10.11.1) and as root I can create the symlink but not remove it. Might you be using a different filesystem or something?
- mhandley 11y agoHow strange. I'm also on 10.11.1, and I get "file name too long": sh-3.2# ln -s ftw $str1/$str2/$str3/$str4/L ln: 1.../2.../3.../4.../L: File name too long sh-3.2# mount /dev/disk1 on / (hfs, local, journaled) ... Edit: see my comment above - you can indeed create a path too long; just not in one go.
- robinhouston 11y agoAh, it looks as though it works in /tmp (where I first tried) though not in my home directory. Very odd…
- r618 11y agoare you sure you haven't somewhere typo or are you possibly on beta ? - on 10.11.1 (15B42) as per OP the link gets created