 |
 |
mv directories?
|
 |
|
 |
|
aquapaul
|
|
Can someone explain why the mv command won't move directories on OS X PB?
In every un*x I've used you can use mv dir1 dir2, but not osx!
How are you meant to do this?
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Oct 1999
Location: Brookline, Massachusetts, USA
Status:
Offline
|
|
It works for me... what error are you getting?
/Users/lcampbel/tmp> mkdir foo
/Users/lcampbel/tmp> ls -l
total 0
drwxr-xr-x 2 lcampbel staff 24 Nov 9 16:55 foo/
/Users/lcampbel/tmp> mv foo barzle
/Users/lcampbel/tmp> ls -l
total 0
drwxr-xr-x 2 lcampbel staff 24 Nov 9 16:55 barzle/
/Users/lcampbel/tmp>
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Sep 1999
Location: Boston, MA USA
Status:
Offline
|
|
Originally posted by aquapaul:
Can someone explain why the mv command won't move directories on OS X PB?
In every un*x I've used you can use mv dir1 dir2, but not osx!
How are you meant to do this?
Well, if the directories aren't empty I think you have to use "mv -R dir1 dir2". Actually, might be "mv -r dir1 dir2". Can't remember right now.
|
|
|
| |
|
|
|
 |
|
 |
|
aquapaul
|
|
Hmmm. Well that *should* work, but my mv (/bin/mv) only supports the -f -i switches.
mkdir foo; mv foo bar -- that works.
mkdir foo; vi foo/file.txt (enter text); mv foo bar -- this also works.
But copy files in to foo from say another dir, or whatever, and then try to rename it and I get this error:
/users/paul% mv dir1 dir2
mv: rename dir1/ to dir2: Is a directory
Is it just my mv being cheeky?
Paul
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 2000
Status:
Offline
|
|
It's not just you. I too have run into this problem and didn't know what to think of it until now. I'm assuming it's caused by files that have resource forks since it worked when the dir contained a plain text file. Time to go dig up that paper they presented on the OSX filesystem handling at USENIX.
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Sep 1999
Location: Boston, MA USA
Status:
Offline
|
|
Originally posted by aquapaul:
Hmmm. Well that *should* work, but my mv (/bin/mv) only supports the -f -i switches.
Yeah, my bad. I was confusing cp and rm with mv.
I guess I'm not sure why it's not working for you. Seems weird.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |