Reply
 
Thread Tools Display Modes
  #1  
Old 02-22-2007, 02:44 PM
antik's Avatar
antik antik is offline
Super Moderator
 
Join Date: Jul 2005
Location: Estonia
Posts: 3,610
Thanks: 0
Thanked 0 Times in 0 Posts
Default moving directories in FreeBSD
If you think that you can move directories to their new location with command:
Code:
# mv /source/path /destination/dir
then you'll got error message:
Quote:
mv: rename /source/path to /destination/dir: Directory not empty
Yes, you can't do it just like that. One solution is to use cpio:
Code:
# cd /source/path
# find . | cpio -p -dmvu /destination/dir
__________________
"All parts should go together without forcing. Therefore, if you can't get them together again, there must be a reason. By all means, do not use a hammer." -- IBM maintenance manual, 1975
Reply With Quote
  #2  
Old 02-22-2007, 02:56 PM
Solarin's Avatar
Solarin Solarin is offline
Super Moderator
 
Join Date: Jul 2005
Location: Birmingham, UK
Posts: 743
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Or:

Code:
mv /source/path/* /destination/dir/
__________________
Tim McCormick
PC-BSD Lead Developer
tim at pcbsd.org
Reply With Quote
  #3  
Old 02-22-2007, 02:57 PM
marc marc is offline
Senior Member
 
Join Date: Jun 2006
Location: Silesia/Poland
Posts: 1,322
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to marc
Default
Isn`t it TOO COMPLICATED? unnecessarily ...

Code:
cp -R /source/subdir /dest/subdir && rm -R /source/subdir
I think it`s more "-h" like ...
but that`s just my way of dealing with CLI, maybe not that efficient.
It fits my needs anyway ... :idea:
__________________
Marc Smith
Reply With Quote
  #4  
Old 02-22-2007, 02:58 PM
marc marc is offline
Senior Member
 
Join Date: Jun 2006
Location: Silesia/Poland
Posts: 1,322
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to marc
Default
Originally Posted by Solarin
Or:

Code:
mv /source/path/* /destination/dir/
That`s even better.
__________________
Marc Smith
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving to 8-stable? bsdaddict General Questions 0 03-25-2010 03:03 PM
Moving files from Win XP Pro to PC-BSD... John J Drives 20 06-28-2009 10:52 PM
Not recognized directories/folders xenonsoft General Questions 8 09-30-2007 07:59 PM
Moving PCBSD to another pc without reinstallation ? pangeran General Questions 6 04-24-2007 09:59 AM
Moving from Windows to PC-BSD Fr@nKy Installing PC-BSD 29 07-22-2006 11:39 AM


All times are GMT. The time now is 02:39 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Copyright 2005-2010, The PC-BSD Project. PC-BSD and the PC-BSD logo are registered trademarks of iXsystems.
All other content is freely available for sharing under the terms of the Creative Commons Attribution License.