Discussion:
Copying hidden files with cp?
(too old to reply)
Angel Tsankov
2007-01-10 13:56:27 UTC
Permalink
How can I copy all the files in a directory (incl. hidden files
and excl. . and ..) with cp alone?
Moe Trin
2007-01-10 20:05:46 UTC
Permalink
On Wed, 10 Jan 2007, in the Usenet newsgroup comp.os.linux.questions, in article
Post by Angel Tsankov
How can I copy all the files in a directory (incl. hidden files
and excl. . and ..) with cp alone?
Why would you want to? What-ever. Use the correct regular expressions

cp * .[0-z]* /destination/directory

[compton ~]$ whatis regex
regex (7) - POSIX 1003.2 regular expressions
[compton ~]$

Old guy
Bill Marcum
2007-01-11 07:27:23 UTC
Permalink
On Wed, 10 Jan 2007 15:56:27 +0200, Angel Tsankov
Post by Angel Tsankov
How can I copy all the files in a directory (incl. hidden files
and excl. . and ..) with cp alone?
cp -a directory destination
copies the entire directory including hidden files and subdirectories.
--
What we Are is God's gift to us.
What we Become is our gift to God.
Loading...