- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- copy all files and dirs including hidden ones
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2015 09:45 AM - last edited on 01-29-2015 12:43 AM by Maiko-I
01-28-2015 09:45 AM - last edited on 01-29-2015 12:43 AM by Maiko-I
copy all files and dirs including hidden ones
Hello,
I would like to copy all files and dirs (includding hidden files) on a HP-UX 11.31 box, what would be the right command since cp -pR does not copy them all?
Thanks
P.S. This thread has been moved from General to HP-UX > languages. - Hp Forum Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2015 10:03 AM - edited 01-28-2015 10:04 AM
01-28-2015 10:03 AM - edited 01-28-2015 10:04 AM
Re: copy all files and dirs including hidden ones
>> since cp -pR does not copy them all?
cp will copy what you tell it to copy.
However, if you are using * as a way to specify files and directories, you need to read about Filename Generation and Pattern Matching in your shell manual. The * character will not match any file or directory that starts with the . (period or dot character). If you need to copy everything in a directory, don't use * but instead use . which means "everything in this current directory", like this:
# cd /tmp/olddir # cp -rp . /var/tmp/newdir
Or better yet, just specify the directory to be copied:
# cp -rp /tmp/olddir /var/tmp
And the directory olddir will be compleely copied to /var/tmp.
Bill Hassell, sysadmin