[sclug] Copy drive problem

Ed Davies sclug.xu.1106 at edavies.me.uk
Tue Mar 5 09:01:28 UTC 2013


On 2013-03-04 23:58, John Stumbles wrote:
>  > That said, it is an odd flag to have.
> 
> Presumably the coders thought the default 'follow' behaviour was the 
> sensible default so added 'nofollow' to allow for those infinitely rare 
> occasions where coders fail to second-guess users' actual requirements? ;-)

As far as I can see all this flag does is cause an error
message if the name passed on the if switch happens to be a
symlink. I'm having a hard time third-guessing when that
would be the user's actual requirement.

edavies at bill:~/temp$ mkdir t
edavies at bill:~/temp$ cd t
edavies at bill:~/temp/t$ echo abc > a
edavies at bill:~/temp/t$ echo bcd > b
edavies at bill:~/temp/t$ ln -s a s
edavies at bill:~/temp/t$ ls -Al
total 8
-rw-rw-r-- 1 edavies edavies 4 Mar  5 08:54 a
-rw-rw-r-- 1 edavies edavies 4 Mar  5 08:55 b
lrwxrwxrwx 1 edavies edavies 1 Mar  5 08:55 s -> a
edavies at bill:~/temp/t$ dd iflag=nofollow if=s of=a
dd: opening `s': Too many levels of symbolic links
edavies at bill:~/temp/t$

Any further thoughts?

Ed.



More information about the Sclug mailing list