Please, need a bash script move...
hello.
can anyone help me i need a bash script which move conents from one directory(directory and files) /home/temp/* and put it in to another directory with same stucture(directory and files) /home/save/ But if file or directory in /home/save/ exist like mv /home/temp/bla/ /home/save/bla/ only update contesnts inside, or not exist create it. If files in directory exist : mv /home/temp/bla/file.txt /home/save/bla/file.txt cheate backup or reneme new file-(not replace) like /home/save/bla/file(1).txt thanks fore help p.s Sorry for bad EN. |
Sounds eerily like homework. Here's how you fish --> http://tldp.org/LDP/abs/html/abs-guide.html. Take a look at Table B-3. Also, take a look at
Code:
man mv |
in man mv there is one command chich is --bachup=numbered
but it make directory backup i don't need it.I need only for files. And --bachup ... make .~1~ .~2~ after file extension and thats not nessesary file.txt.~1~ |
Quote:
|
All times are GMT -5. The time now is 09:52 AM. |