- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Differences...advantages mv vs. find
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
Forums
Discussions
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
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
06-27-2001 07:30 AM
06-27-2001 07:30 AM
Differences...advantages mv vs. find
is there any difference and/or advantage when moving all the contents of a directory to another directory using either:
mv * /newdir
versus
find . -xdev | cpio -pdmuvx /newdir
Thanks
PS: If you have a different/better/favorite way ... chime in.
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2001 07:41 AM
06-27-2001 07:41 AM
Re: Differences...advantages mv vs. find
if /newdir belongs to the same filesystem, mv just changes the inodes, no physical move happens while cpio actually reads and writes data.
If it is on diffrent filesystems, i see no real difference in the result.
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2001 07:43 AM
06-27-2001 07:43 AM
Re: Differences...advantages mv vs. find
Did you actually measure with time which one is best.. in terms of performance.
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2001 07:46 AM
06-27-2001 07:46 AM
Re: Differences...advantages mv vs. find
Both took a long time... so I can't say that there was any measurable difference....except to say that after the find command was done... I had to go back and rm the copied data. That took longer, considering the mv command (once completed) "deletes" the "copied" files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2001 08:07 AM
06-27-2001 08:07 AM
Re: Differences...advantages mv vs. find
Do you have to do this action frequently ?
I would go for seperate filesystems in this case:
umount /last_weeks
newfs "last_week_rlvol"
umount /this_week
mount "last_week_lvol" on /this_week
mount "this_week_lvol" on /last_week
with this, you could quickly toggle two filesystems.
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2001 08:10 AM
06-27-2001 08:10 AM
Re: Differences...advantages mv vs. find
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2001 08:23 AM
06-27-2001 08:23 AM
Re: Differences...advantages mv vs. find
if it includes subdirectories and you are crossing file systems, I don't think "mv" will allow it.
If I have the room, I opt to copy rather than move, just in case something goes wrong part way through the process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2001 08:32 AM
06-27-2001 08:32 AM