- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: mv question
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
Forums
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
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
тАО07-20-2004 09:09 PM
тАО07-20-2004 09:09 PM
I have this directory /appl/appl ,
I want to move the whole directory to /appl .
What is the best way ?
BYE
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2004 09:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2004 09:15 PM
тАО07-20-2004 09:15 PM
Re: mv question
mv /appl/* /appl
rmdir /appl/appl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2004 09:18 PM
тАО07-20-2004 09:18 PM
Re: mv question
just type
cd /appl/appl
tar cfv - .|(cd ../; tar xfv -)
cd ..
rm -r appl
That's it
Franky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2004 09:19 PM
тАО07-20-2004 09:19 PM
Re: mv question
You can try
cd /appl
tar cf - appl | (cd / ; tar xvf -)
rmdir /appl/appl
Regards,
Frederic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2004 09:21 PM
тАО07-20-2004 09:21 PM
Re: mv question
# find . -dept -print | cpio -pudmv /appl
# cd /appl
# rm -r /appl/appl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2004 09:22 PM
тАО07-20-2004 09:22 PM
Re: mv question
cd /appl/appl
mv .* ..
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2004 09:36 PM
тАО07-20-2004 09:36 PM
Re: mv question
I got this :
hp1:>pwd
/appl/appl
hp1:>mv * ..
hp1:>ls
.cshrc .exrc .login .profile
hp1:>mv .* ..
mv: ../.: rename: Device busy
mv: .. and .. are identical
hp1:>ll
total 0
The files moved but i got this error ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2004 09:38 PM
тАО07-20-2004 09:38 PM
Re: mv question
another way to do it:
cd /
mv /appl/appl /temp_dir
rm -rf /appl
mv /temp_dir /appl
Frank.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2004 09:44 PM
тАО07-20-2004 09:44 PM
Re: mv question
this happened, because you also tried to moved '.' and '..' in the upper directory.(where this files already exists.)
You can ignore this error message.
But maybe '..' isn't there any more?
Check it with 'll -a'
Then type 'cd /apps' to move one step up.
Volkmar