+-------[ Greg Black ]----------------------
| Observe the following:
| 
|     $ uname -rs
|     FreeBSD 4.1-RELEASE
|     $ ls -l
|     $ mkdir foo
|     $ ln -s foo bar
|     $ rmdir bar
|     rmdir: bar: Not a directory
| 
| So far, so good -- but look at this:
| 
|     $ rmdir bar/
|     $ ls -l
|     total 0
|     lrwxrwx---  1 gjb  wheel  3 Feb  4 06:35 bar -> foo
|     $ 

for kicks notice the difference between

cp -R foo
and 
cp -R foo/

foo doesn't have to be a symlink.

the cp manpage doesn't mention this;

     -R    If source_file designates a directory, cp copies the directory and
           the entire subtree connected at that point.  This option also caus-
           es symbolic links to be copied, rather than indirected through, and
           for cp to create special files rather than copying them as normal
           files.  Created directories have the same mode as the corresponding
           source directory, unmodified by the process' umask.

foo and foo/ both designate a directory (if foo is not a symlink).

thank god for setopt auto_remove_slash in zsh d8)

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd          |  F:+61 7 3870 4477   | 
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068    |[EMAIL PROTECTED]| 


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to