- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- copying the dot (.) files.
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
Forums
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
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
11-16-2003 06:21 PM
11-16-2003 06:21 PM
when i try to copy whole directory structure using the command, from the source directory
# cd /source
# cp -p -R * /destination
this command doesn't copy the dot (.) files in the /source directory.
how can i accomplish this?
we are at hp-ux 10.20.
thanks and regards,
Yasir.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2003 06:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2003 07:24 PM
11-17-2003 07:24 PM
Re: copying the dot (.) files.
cd sourcedir ; tar cvf - . | ( cd destdir ; tar xvf - )
Regards
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2003 03:39 AM
11-18-2003 03:39 AM
Re: copying the dot (.) files.
cp .??* _some_destination_
e.g. cp /etc/skel/.??* /home/wherever
This will copy only dot files with filenames
longer than 2 chars.
Armin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2003 05:04 AM
11-18-2003 05:04 AM
Re: copying the dot (.) files.
to match just the dot files use this
ls -la .[!.]*
and anything but a dot
ls -la [!.]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2003 05:31 AM
11-18-2003 05:31 AM
Re: copying the dot (.) files.
rm -rf * .*
which would match all files in the current directory and all the dotfiles (which is good) but also remove every file and directory above the current location. If this was /home/billh then the ENTIRE contents of /home will be removed (generally a bad thing). Always use the [!.] exclusion that eliminates . as the second character for a match.
Bill Hassell, sysadmin