copying files
Ray Nickson
Ray.Nickson at comp.vuw.ac.nz
Thu Dec 13 12:20:55 AEST 1990
In article <2763ACE5.12204 at maccs.dcss.mcmaster.ca> dan at maccs.dcss.mcmaster.ca (Dan Trottier) writes:
>| >>|Do any of you UNIX wizards know how to even list all of
>| >>|the names of the files which begin '.' (besides, of course
>| >>|the files in the root (second line of list)
The most efficient in terms of starting processes would be the following:
alias l. 'set dotfiles = `echo .?*` ; echo $dotfiles[2-]'
$ mkdir foo
$ touch .a .xyz
$ set dotfiles = `echo .?*`; echo $dotfiles[2-]
[2-]
... oops, he means the CrackedShell ...
$ csh
% set dotfiles = `echo .?*`; echo $dotfiles[2-]
.a .xyz
... looks ok, but ...
% touch .-
% set dotfiles = `echo .?*`; echo $dotfiles[2-]
.. .a .xyz
Problem: . and .. don't necessarily come first in a (sorted) directory
listing!
-rgn
--
Ray Nickson <Ray.Nickson at comp.vuw.ac.nz> + 64 4 721000x8144
"Winter in water colours"
More information about the Comp.unix.shell
mailing list