Shell script help
Hello I am new to shell scripts and have looked and researched on how to cut files from one folder and put it in a different folder I think I have all the cut and past cmd but can't get it to work
|
Quote:
|
Quote:
mv [options] source destination Tom |
And, a great site for learning the basic commands and shell scripting > LinuxCommand.org
|
|
First note these two things:
Code:
Now, let me show you how to move a file from a directory to some other directory. I am currently in this directory: Code:
Code:
Now I will move the above file into my current directory as shown below: Code:
[demo@localhost ~]$ mv /tmp/hello . Now let's move the file back to its previous location: Code:
[demo@localhost ~]$ mv hello /tmp Before moving, you can check what you are going to move: Code:
To avoid overwriting a file if it is already present in the destination directory, do this: Code:
Note: If you do not provide a destination directory name then the file will be renamed: Code:
[demo@localhost ~]$ mv /tmp/hello /tmp/hi |
All times are GMT -5. The time now is 01:58 PM. |