mv command behavior

davidpm
davidpm used Ask the Experts™
on
I issued the command mv public public2
In DOS if I do ren public public2 or in windows right click on the folder and select rename the process happens almost instantly even if the folder is large.

The mv command, I verified this with the v switch, seems to actually move every file. Very slow.

I never noticed this before because I never tested a large directory before. Am I understanding this correctly? Is their a fast way?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
OK I just figured out what I did.
/home/public is a device. It is a seperate hard drive.
So when I did a mv to /home/public2 I was actually moving to another hard drive so of course it was going to take forever.

Now I'm really in trouble.
I deleted /home/public2

Now I did something so /home/public will not mount
It drops to a prompt
I did fsck /home/public and it says the superblock is bad

I Don't mind zaping the /home/public drive I have the data but how do I boot so I can do what?





Commented:
try using fsck -r /dev/whatever (interactive)
this will make anattempt at fixing your system

or fsck -a

Author

Commented:
What my Linux guy did was just format the drive as I had the data already saved.
Thanks.
It seems to be much faster now also.
I wonder about that because ext2 is not supposed to need de-fragging

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial