[Techtalk] New to the list...new to linux
Kai MacTane
kmactane at GothPunk.com
Sat Sep 29 17:40:56 EST 2001
At 9/29/01 05:24 PM , Tianna Thomas wrote:
>Do I need the /'s ?
>
>Me=clueless
>
>Tianna
>
>-----Original Message-----
>From: Kath [mailto:kath at kathweb.net]
>Sent: Saturday, September 29, 2001 5:22 PM
>To: Tianna Thomas; techtalk at linuxchix.org
>Subject: Re: [Techtalk] New to the list...new to linux
>
>
>I think:
>cp /dir1/* /dir2/
>
>or if you are already in dir1
>
>cp * /dir2/
>
>Would do that :)
But only if the directory has no subdirectories. And this will also change
the ownership on the files, which may be a problem. Two solutions that will
give better results, assuming you want to move /foo/bar/movethis to
/baz/quux/target:
1) cp -a /foo/bar/movethis /baz/quux/target
2) mv /foo/bar/movethis /baz/quux/target
Which one do you want? Depends whether you want to copy, or move. But
either of these commands will transfer subdirectories and keep ownerships
intact.
--Kai MacTane
----------------------------------------------------------------------
"Why can't I live a life for me?
Why should I take the abuse that's served?
Why can't they see they're just like me?
I'm not the one that's so absurd!"
--Ministry,
"Every Day is
Halloween"
More information about the Techtalk
mailing list