Tagged Questions
4
votes
3answers
55 views
Back up logs to a new directory
I need help to write a script to copy log files.
There are two format of logs:
System_<date_timestamp>.log
trace_<date_timestamp>.log
New files are generated when trace log reaches ...
2
votes
1answer
35 views
exec cp failes from script, yet works when issued directly
I have a script that copies SQL backups to a windows server. Here's the line from /etc/fstab:
//my.win.box/share$ /winshare cifs ...
0
votes
4answers
65 views
concatenating multiple files with multiple headers
Im trying to concatenate multiple files with multiple headers to have one file with all the information in it for example.
File 1:
Numbers
1
2
3
Letters
A
B
C
File 2:
Numbers
4
5
6
Letters
D
E
...
3
votes
4answers
434 views
Make cp return an error value if the target exists
Is there a way to make cp (from GNU coreutils on Linux) return a nonzero value in case the target file does already exist?
Or is there any other small utility which is commonly available and which ...
1
vote
0answers
179 views
Can I get the backup option of cp and mv to work with directories?
--backup[=CONTROL]
make a backup of each existing destination file
The man page does say that it works on file. It doesn't seem to have any effect on directories. Is there anyway to make this ...
3
votes
3answers
295 views
Delete files in a directory which are also in another directory
I copied a directory using this:
cp -r dir/ ../../
without thinking and realized that it copied the contents of dir instead of actually dir to the above directory. Now I have a mess of files I need ...