copying files

matt robinson yakker at ucrmath.ucr.edu
Sat Dec 22 22:44:47 AEST 1990


Ray Saddler writes:
->Brian Fennell suggests:
->.Ray Shwake replies:
->..Rouben Rostamian proposes:
->...Scott P Nichols asks:
->....
->....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) 
->....
->...Try ->...	ls -d .*
->..
->..	For some users on some systems, this will list both current directory
->..(.) and parent directory (..), which is not what is required. Try instead:
->..
->..	ls -d .??*
->.
->.ls -dal `ls -da .* | grep -v '^\.$' | grep -v '^\.\.$' `
->
->I use the simple command: ls -al .??*

What's the subject here?  Is this the "my ls command is better than your ls
command will ever be" week?  A simple way to do an ls of all dot files in the
current directory (excluding the ./ and ../), is

	ls -Al .??*

and for files with the ./ and ../, use

	ls -dla .*

So, you try this out, or try any of the other umpteen billion posts to this
answer, and I'm sure ONE of them will work.

But, the title said "copying files".  For copy, of most kinds, I've learned
that man's best friend is "tar", and "cpio" (your own flavor).  Why would you
discuss file listings with this topic? (Sigh).  Anyone want to change the
present thread?

--Matt

______________________________________________________________________________
Matt D. Robinson                                 "...if I only had a brain..."
Systems Programming Group, UC Riverside     -- The Scarecrow, The Wizard Of Oz
Internet : yakker at ucrmath.ucr.edu       UUCP : ..!ucsd!ucrmath!{yakker,source}



More information about the Comp.unix.shell mailing list