- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- equivalent of cp
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
05-10-2007 08:25 AM
05-10-2007 08:25 AM
what can be the equivalent "cp -rp" for the mv command.
there is a directory which i created using cp -rp ..here is the exmaple :
cp -rp prot prot.0510.
Now I want to move the prot.0510 to prot using the mv command rather than the cp or a combination of cp and rm.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2007 08:27 AM
05-10-2007 08:27 AM
Re: equivalent of cp
# mv prot.0510 prot.0511
Did you try looking at the mv man page?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2007 08:48 AM
05-10-2007 08:48 AM
Re: equivalent of cp
mv: prot.0510 is a directory
mv -f prot.0510 prot
mv: prot.0510 is a directory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2007 08:53 AM
05-10-2007 08:53 AM
Re: equivalent of cp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2007 08:59 AM
05-10-2007 08:59 AM
Re: equivalent of cp
# ls -ldrt prot.0510 prot
drwxr-xr-x 3 root sys 96 May 10 15:52 prot
drwxr-xr-x 2 root sys 96 May 10 15:54 prot.0510
# mv prot.0510 prot
# ls -ldrt prot.0510 prot
prot.0510 not found
drwxr-xr-x 3 root sys 96 May 10 15:54 prot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2007 08:59 AM
05-10-2007 08:59 AM
SolutionIf you want to mv the CONTENTS of the prot.0510 directory to the prot directory, then try:
# cd prot.0510
# mv * ../prot
or
# mv prot.0510/* prot
The man pages are rather helpful if you read them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2007 09:14 AM
05-10-2007 09:14 AM
Re: equivalent of cp
# mv * ../prot
it works but the prot directory is not removed altogether , which I want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2007 09:15 AM
05-10-2007 09:15 AM
Re: equivalent of cp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2007 09:20 AM
05-10-2007 09:20 AM
Re: equivalent of cp
# mv -e force prot.0510 prot
~cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2007 03:45 PM
05-10-2007 03:45 PM
Re: equivalent of cp
# ls -ldrt prot.0510 prot
drwxr-xr-x 3 96 May 10 15:52 prot
drwxr-xr-x 2 96 May 10 15:54 prot.0510
# mv prot.0510 prot
# ls -ldrt prot.0510 prot
prot.0510 not found
This is elementary container theory. When you move prot.0510 to prot, you put it inside prot.
(I assume that was Sandman's point?)