This command will copy the files from /dev/data/ to /isdev/data//history and will not throw even if there is no files in source.
But if i modify the path from /isdev/data//history to /isdev/data/history1
the command is not failing( history1 folder doesn't appear in unix server) instead the command is creating a file called history1 in /isdev/data/ folder.
This there anyway to alter the command to fail if the path is invalid.
Unix is not a MSDOS. Filename *.* does not have the same meaning in unix as MSDOS and can cause you to miss files. In your case it will miss directories unless the directory name contains a full stop character.
The command sequence posted may be nearly giving the right results by accident. it is however not correct.
After re-reading your post several times I am not 100% clear what you are trying to do.
Are there any subdirectories under /dev/data ?
Are there any files directly under /dev/data ?
If there are subdirectories, do you you want to replicate that tree under /isdev/data/history ?
If so you should really be looking at unix "cpio -p" not "cp -R". This will also address your problem of "cp -R" creating the directory tree one level down.
For example (but do check your local "man cpio").
Last edited by methyl; 03-28-2009 at 05:05 PM..
Reason: Typo
Hi ,
I am trying to take a backup of file before overwriting it with cp command, I am using the command cp -b.
-rw-rw-r-- 1 autoengine murex 0 Jan 22 07:08 a
-rw-rw-r-- 1 autoengine murex 0 Jan 22 07:08 b
cp -b a b
-rw-rw-r-- 1 autoengine murex 0 Jan 22 07:08 a
-rw-rw-r-- 1... (1 Reply)
Hi Folks,
I have a file name abc.xml in my windows machine at the location c:\ytr\abc.xml
which I want to place at the unix box machine inside cde directory.. at the following location that is /opt/app/cde/
now the credentials of unix box are
abc345 -->(dummyid)
ftyiu88--->(dummy passwd)
... (4 Replies)
Hello,
I have a directory in which I have files as follows
CRDT.csv
CRDT.csv.1
CRDT.csv.2
....
CRDT.csv.n
I would like to copy it over to another directory as
crdt_lon.csv
crdt_lon.csv.1
crdt_lon.csv.2
....
crdt_lon.csv.n
I am looking for a one line command but I am... (5 Replies)
Hi, im taking an entry Unix class, and as part of my lab assignment I have to copy all files in the /home/david/lab3 directory that have the file extension .save to your lab3/temp directory. I'm having trouble getting the grep to do anything worth while
I've been trying to do:
cp... (6 Replies)
I have a problem using uucp. I have Ubuntu 10.4 and i installed the 'uucp' package.
In my LAN there are a desktop pc, a laptop, and the router
the desktop local ip is: 192.168.0.2
the laptop local ip is: 192.168.0.4
Here are the /etc/uucp/config and the /etc/uucp/sys i used on the desktop.... (4 Replies)
How can we copy a command string from a previous command line and paste it into the cursor position on the current command line? I know that ^c will not work as the shell will interpret as an interrupt signal.
Thanks, (1 Reply)
Hi,
I'm new to Unix and am trying to write a copy command for the following scenario: Copy all .tif files from the src directory to dest directory but exclude the ones under archive directory.
In other words, I'm trying to write the unix cp equivalent of the following ant target:
<target... (3 Replies)
sir
can any body tell me how i can copy files like
copy c:\abc\pqr\mr.txt c:\windows\my documents\this.txt
i need command in linux like this
really i am a new in linux that is why simple questions
alson can any body explain me how i get current directory tree or path
in windows... (2 Replies)