473,388 Members | 1,382 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

move directory command

28
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.
Jul 6 '09 #1
8 36455
micmast
144 100+
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
Jul 6 '09 #2
seanh
28
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.
Jul 6 '09 #3
micmast
144 100+
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.
Jul 7 '09 #4
seanh
28
Hi MicMast,
Now I understand!
Thank you so much for your time, patience and specially your help! I really appreciate it.
sean
Jul 7 '09 #5
micmast
144 100+
no problem, I hope I can help you more in the future.
Jul 7 '09 #6
drhowarddrfine
7,435 Expert 4TB
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.
Jul 21 '09 #7
Frinavale
9,735 Expert Mod 8TB
@drhowarddrfine
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".
Aug 18 '09 #8
drhowarddrfine
7,435 Expert 4TB
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.
Aug 21 '09 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Sami Viitanen | last post by:
Hello, I'm having problems with os.system. If I execute some 'cd directory' command with it, after that the script is on the same directory level as it was before the command. Any ideas ?
8
by: Siemel Naran | last post by:
Hi. I'm writing a command shell that reads commands from standard input. At this point I have the command in a std::string. Now I want to execute this command in the shell. From the Borland...
1
by: John S | last post by:
Hi All, What is the SQL command for creating a direcotry c:\mydata\data1 on my server. Thanks in advance John S
3
by: Mary Jane Pronio | last post by:
What I want to do is take that output, use the data within it to put into a shell script as input to another installation of DB2 Connect on another AIX box. Any ideas about how to do this?
8
by: moondaddy | last post by:
Is there a way to make the browser move back to the previous page via code behind on the server? The effect would be the same as the user clicking on the browser's back button. Thanks. --...
1
by: Allen Maki | last post by:
I would appreciate if someone helps me. I am reading a book called MS visual c++ .net step by step. I am using Visual C++ .net version 2003. I am trying to learn reading from file using...
6
by: Proaccesspro | last post by:
I have a command button on a form. When the command button is clicked, I would like to relocate it on the form. I thought I would do so using the LEFT and TOP properties, but I'm getting no love. ...
0
by: Lou | last post by:
I could do the following very easy in VB6 to get a list of files in an FTP directory. But How do you do this in .NET 2005 ..RemotePort = mServerPortNumber .RemoteHost = Replace(mServerAddress,...
0
by: Paul | last post by:
Hi, I am looking to create an eLearning resource using VB2008. I have a form with a background picture of a cross section of a strand of hair magnified x1000. The around the edge of the hair...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.