01-21-2010
Shell Script for Copy files from one location to another location
Create a script that copies files from one specified directory to another specified directory, in the order they were created in the original directory between specified times. Copy the files at a specified interval.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I need help in forming a script to copy files from one location which has a sub directory structure to another location with similar sub directory structure,
say location 1,
/home/rick/tmp_files/1-12/00-25/
here 1-12 are the number of sub directories under tmp_files and 00-25 are sub... (1 Reply)
Discussion started by: pharos467
1 Replies
2. Shell Programming and Scripting
Hi,
On the server, we have app log files in this location /app/logs/error.log
On the same server, in a real time, we would like to replicate that into /var/ directory.
if someone has already done this, please share the script.
Thanks in advance. (4 Replies)
Discussion started by: lookinginfo
4 Replies
3. Shell Programming and Scripting
I have file file1.txt in location 'loc1'. Now i want a copy of this file in location 'loc2' with a new file called test.txt.
Please help me how to do this in shell script. (1 Reply)
Discussion started by: vel4ever
1 Replies
4. UNIX for Dummies Questions & Answers
:EDIT:
I think my post name should have been labeled: how to copy files and record original file location. not "retain".
Hello, this is my first post! I searched the forums a lot before posting, but was unable to answer my question.
Here's my problem:
There are several hundred text files... (4 Replies)
Discussion started by: willie8605
4 Replies
5. Shell Programming and Scripting
A) I would like to achive following actions using shell script. can someone help me with writing the shell script
1) Go to some dir ( say /xyz/logs ) and then perform find operation in this dir and list of subdir using
find . -name "*" -print | xargs grep -li 1367A49001CP0162 >... (1 Reply)
Discussion started by: GG2
1 Replies
6. Shell Programming and Scripting
Hi Gurus,
I am a newbie to shell scripting and I am facing a problem right now.I have to automate the copy of files based on a priority.The scenario is as below:
1) There will be files from Mon-Fri with Mon file being named as abc_def_01_YYYYMMDD and Tue file being abc_def_02_YYYYMMDD and so... (4 Replies)
Discussion started by: vikramgk9
4 Replies
7. Shell Programming and Scripting
I have below files in one location /test/files and also for each dates there are similar files
A20130924.0000-0005_file1
A20130924.0000-0005_file2
A20130924.0005-0010_file1
A20130924.0005-0010_file2
.
.
.
A20130924.2355-0000_file1
A20130924.2355-0000_file2
If i execute the script like... (4 Replies)
Discussion started by: Saidul
4 Replies
8. Shell Programming and Scripting
Hello Experts,
I need to copy files from one location to another using xargs.
Tried something like this (In Ubuntu & Solaris ).
mkdir -p 1234;
find /home/emd/Desktop/n007/M007/ -type f -name "A2014*" | xargs -0 cp -r {} /home/emd/Desktop/1234
But every time i run this, a weird error... (6 Replies)
Discussion started by: Saidul
6 Replies
9. Shell Programming and Scripting
Hi All,
i'm trying to copy the 1.txt files (sample files) in to different path location using the below command.
But it is not copying the files , when i tried for single location able to copy the file.
can any one please assist here.
Please find the below path :-
/ckr_mkr1/licencekey... (2 Replies)
Discussion started by: venkat918
2 Replies
10. UNIX for Beginners Questions & Answers
Hello everyone, Im super new to coding but increasingly in need of it at work. Im have task stacked because of this problems, that I cannot figure out how to solve looking on the internet after trying many many things that looked similar to me.
I have multiple data files of the form (see below).... (2 Replies)
Discussion started by: Xfiles_fan
2 Replies
LEARN ABOUT DEBIAN
atfsit
atfsit(1) ShapeTools atfsit(1)
NAME
atfsit - A program to prepare files for version control
SYNOPSIS
atfsit [ -cFhfsmM ] [ -qad ] [ -Iflags ] [ -Rflags ] [ -tdirectory ] file1 ...
DESCRIPTION
Atfsit is a semi-intelligent program to prepare files for ShapeTools version control. This involves putting the correct type of headings
at the top of the file so that retrv will update a header and log changes in the file.
By default, atfsit will use default headers ``hard-wired'' into itself for each different file type that it ``knows'' about. (See below
for list of known file types).
If the -tdirectory option is specified, then atfsit will use ``.template.suffix'' files (where ``suffix'' is a suffix that atfsit ``knows''
about) found in directory. If a directory name is not specified on the command line, then the environment variable TEMPLATES is used. If
$TEMPLATES is not set, then the environment variable, HOME is tried.
The following template files are recognized:
Template NameFile Type
---------------------------------------
.template.c Standard C
.template.h C Include
.template.f Fortran
.template.shShell Script
.template.makeMakefile
.template.manManual
Atfsit is ``semi-intelligent'' in that it can guess the type of headers to put in the file by the type of file (C program, C include, make-
file, shell script, or manual). It determines the file type by looking at the name of the file. If the name of the file is ``Makefile''
or ``makefile'', then the file type is taken to be for make(1). The suffix after the last ``.'' in the file name is then used. The fol-
lowing table shows the suffixes that atfsit knows about:
Suffix File Type
---------------------------------------------
c C Program
F C Program (with compile flags)
h C Include
f Fortran
mk Make(1) file
sh Shell Script
csh Shell Script
[1-9] Manual (digits 1 - 9)
If the environment variable ``ATFSDIR'' is present, then atfsit will attempt to make a link from it to ``AtFS'' in the current directory if
the -I option is used and there is no directory called ``AtFS'' already, in the current directory. If the -I option is used and ``ATFS-
DIR'' is not specified in the environment, then a normal directory called ``AtFS'' will be created. This feature can be overrided with the
-d option.
OPTIONS
c Force file type to be ``Standard C''.
F Force file type to be ``Standard C''. Add a special header-line for recording of compile-time options in addition to the default
header. The inserted line has the form static char *ConfFlg = CFFLGS. CFFLGS must be a string value. As it is very inconve-
nient, to define the proper value of CFFLGS from the command-line, this feature is more intended to be used from within Make-
files.
h Force file type to be ``C Include''.
f Force file type to be ``Fortran''.
M Force file type to be ``Manual''. Note: If you also specify the ``Iflags'' option, atfsit will run vadm(1) to tell ShapeTools
what kind of comment string to use for the manual file.
s Force file type to be ``Shell Script''.
m Force file type to be ``Makefile''. Note that this does the same thing as the -s option does. It just prints a different mes-
sage.
t Do not use any Template files for the headers.
q Be quiet. Don't print out what is going on. Only error messages are printed.
d Do not attempt to make the directory ``AtFS''. See above for more info.
a Turn off auto guessing of file type.
Iflags Check In file. Run save(1) on the file with ``flags'' being passed onto save(1) as the command line arguments.
Rflags Run vadm(1) with ``flags'' as the command line arguments.
FILES
/tmp/atfsit* - temporary buffer
~/.template.* - template files to use as the header.
AUTHOR
Michael Cooper (mcooper@usc-oberon.ARPA)
Modified for use with ShapeTools by Axel.Mahler@cs.tu-berlin.de
SEE ALSO
save(1), vadm(1), retrv(1).
DIAGNOSTICS
Complains about the usual stuff. (i.e. - the specified file doesn't exist, or it can't read it...just things like that.)
atfsit-1.15 Tue Jun 29 16:29:16 1993 atfsit(1)