Connecting Tech Pros Worldwide Help | Site Map

move directory command

  #1  
Old July 6th, 2009, 01:09 AM
Newbie
 
Join Date: Sep 2007
Posts: 22
Hi all,
Does anyone know how what move directory command I need to use:

I am in current directory tmp and I have a folder inside tmp name work I would like to get all contents(files, subfolders) from work to tmp. Can someone PLEASE HELP ME with this.
Thank you all in advance.
  #2  
Old July 6th, 2009, 07:55 AM
micmast's Avatar
Familiar Sight
 
Join Date: Mar 2008
Location: Belgium
Posts: 132

re: move directory command


mv /tmp/yourfolder /new/location/

You can generally handle a folder just like you handle a file. For example deleting a directory is also with the rm command (with the argument -r because you need to delete recursivly (bad spelling I know)). Hope this helps
  #3  
Old July 6th, 2009, 09:27 PM
Newbie
 
Join Date: Sep 2007
Posts: 22

re: move directory command


Thank you so much for your reply MicMast,

Could you help me out with two last question.

Im a little confuse. in your example mv /tmp/yourfolder /new/location/
do all the contents (everything files,subfolders) inside of "yourfolder" move to inside of "location" or does the folder its self ("yourfolder") with everything in it move inside of "location"?

My last question is what is recursively ? I come from a windows op. sorry to ask I looked and read in forums but don't really understand what it is.
Thank you so much for your time and patience Im just starting out with centos.
  #4  
Old July 7th, 2009, 01:01 PM
micmast's Avatar
Familiar Sight
 
Join Date: Mar 2008
Location: Belgium
Posts: 132

re: move directory command


if you execute
mv /tmp/yourfolder/* /new/location/folder/
you will copy the content of the folder in tmp to the new location

if you execute
mv /tmp/yourfolder /new/location/folder/
you will copy the folder incl the folder itself to the new location

recursivly is a more complex item. The wikipedia explanation is " Recursion, in mathematics and computer science, is a method of defining functions in which the function being defined is applied within its own definition. The term is also used more generally to describe a process of repeating objects in a self-similar way. For instance, when the surfaces of two mirrors are almost parallel with each other the nested images that occur are a form of infinite recursion." But basicly it means that when you try to delete a folder, the command must be sure the folder is empty before deleting the folder.
  #5  
Old July 7th, 2009, 03:22 PM
Newbie
 
Join Date: Sep 2007
Posts: 22

re: move directory command


Hi MicMast,
Now I understand!
Thank you so much for your time, patience and specially your help! I really appreciate it.
sean
  #6  
Old July 7th, 2009, 08:58 PM
micmast's Avatar
Familiar Sight
 
Join Date: Mar 2008
Location: Belgium
Posts: 132

re: move directory command


no problem, I hope I can help you more in the future.
  #7  
Old July 21st, 2009, 03:22 PM
drhowarddrfine's Avatar
Expert
 
Join Date: Sep 2006
Posts: 5,520

re: move directory command


Please note that we call these "directories" and not folders, which is a Windows term. Perhaps it's a desktop term, too, but not native to *nix itself.
  #8  
Old August 18th, 2009, 07:39 PM
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North :)
Posts: 4,940
Provided Answers: 8

re: move directory command


Quote:
Originally Posted by drhowarddrfine View Post
Please note that we call these "directories" and not folders, which is a Windows term. Perhaps it's a desktop term, too, but not native to *nix itself.
Is "folder" really a Windows term?
I always refer to them as directories.

Edit: aha! it's not just a Windows term...this term was originally used by Apple Lisa and now "is used in almost all modern operating systems' desktop environments".
  #9  
Old August 21st, 2009, 12:48 PM
drhowarddrfine's Avatar
Expert
 
Join Date: Sep 2006
Posts: 5,520

re: move directory command


Yes, Microsoft can't even do that on their own and has to copy it like they copy everything else.

I guess the term is appropriate in a desktop environment but incorrect anywhere else.

And, yes, I'm grumpy today.
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 5 November 14th, 2005 12:36 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 14th, 2005 04:15 AM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 13th, 2005 11:37 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 13th, 2005 09:56 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 13th, 2005 03:15 AM