- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- mv command help
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-13-2009 10:52 AM
11-13-2009 10:52 AM
im doing a daily refresh of my database to a backup location. the database has subdirectories.so this is the command im using
mv /DATA/* /BACKUP
the error is:
subdir in DATA/subdir already exist
my question:
how can i create a script that will move and overwrite the BACKUP dir and SUBDIR with the refreshed data that i move daily?
thanks all in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2009 11:06 AM
11-13-2009 11:06 AM
Re: mv command help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2009 11:12 AM
11-13-2009 11:12 AM
Re: mv command help
as in:
rm -rf /BACKUP
mv /DATA/* /BACKUP
or
if not, then find the directories immediately under /DATA, and using that information, remove the same from the /BACKUP directory, then do the move.
there are probably 1/2 a dozen other ways to do this as well...man tar has a couple of examples that might be enlightening
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2009 11:42 AM
11-13-2009 11:42 AM
Solution1. you can remove the Backup folder and create it again for backup.
2. As you do it on daily basis, so you can make directory under /BACKUP with the name "backup.
3. you can use Tar to group all the files into a single file in /BACKUP folder.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2009 12:02 PM
11-13-2009 12:02 PM
Re: mv command help
cd /; rm -r /DATA
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2009 12:42 PM
11-13-2009 12:42 PM