The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Question about the PS command Nayas AIX 5 02-22-2008 07:26 AM
cp command Question? deal732 SUN Solaris 1 07-19-2007 07:17 AM
Command Question... DBoy12 UNIX for Dummies Questions & Answers 4 02-16-2007 12:14 PM
question about using tr command merliech UNIX for Dummies Questions & Answers 2 04-24-2006 11:26 AM
question about rm command IMPTRUE UNIX for Dummies Questions & Answers 1 09-04-2003 03:36 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-05-2008
Registered User
 

Join Date: Jun 2008
Posts: 1
mv command question

Hello,

i am trying to rename a file X to file Y on different location .

lets say the mv command started but for some reason system crashed while it did not finish.

will file Y be created physically with lets say half the records of what was in file X???

thanks in advance.
Reply With Quote
Forum Sponsor
  #2  
Old 06-05-2008
Moderator
 

Join Date: Sep 2007
Location: Germany
Posts: 1,031
From the AIX mv man page:
Quote:
... the mv command copies the file to the target and deletes the original file.
So it should delete the source only when the copying was successful. You can test it by moving a large file maybe and while it is copying, you send the mv a kill -9, which should bash it very hard, ie. like a crash.
Reply With Quote
  #3  
Old 06-05-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
However, yes, it's quite possible that the destination exists but only has a fraction of the complete file. Examine the file's size and maybe md5sum to be on the safe side.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:25 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0