[Rd] Question about Unix file paths

Peter Dalgaard p.dalgaard at biostat.ku.dk
Tue Nov 25 10:52:52 MET 2003


Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:

> I think there are some potential issues with doubling separators and final
> separators on dirs.  On Unix file systems /part1//part2 and /path/to/dir/
> are valid.  However, file systems on Unix may not be Unix file systems:
> examples are earlier MacOS systems on MacOS X and mounted Windows and 
> Novell systems on Linux.  I would not want to assume that all of these
> combinations worked.

Also, beware that some applications treat trailing spaces specially,
notably rsync:

       a trailing slash on the source changes this behavior to
       transfer all files from the directory src/bar on the machine
       foo into the /data/tmp/. A trailing / on a source name means
       "copy the contents of this directory". Without a trailing slash
       it means "copy the directory". This difference becomes
       particularly important when using the --delete option.


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907



More information about the R-devel mailing list