08-01-2005
Hi Vino,
Thanks for your help. But I working on solaris.. SunOS 5.8
Its failing at line 3. I tried to use the function expr but still nothing happens.
Thanks
Shash
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to write a script that copies files from one directory to another that were created after "today 6:30". This script will be NOT be ran at the same time each day.
any help is appreciated. (2 Replies)
Discussion started by: jm6601
2 Replies
2. Shell Programming and Scripting
I want to loop through files in a directory but omit the file with the latest date in my list of files. How would I accomplish this?
Thanks (2 Replies)
Discussion started by: stringzz
2 Replies
3. Shell Programming and Scripting
Hi,
I have a problem.
I have some text files in a folder. The names can be like:
emp_20080307053015.dat
emp_20080306053015.dat
emp_20080305053015.dat
emp_20080304053015.dat
The date format appended is like yyyymmdd and timestamp.
What i need is i have to copy the latest file every... (12 Replies)
Discussion started by: Aswarth
12 Replies
4. Shell Programming and Scripting
Hi everyone,
Please help:)
I have a list of 1000 different files which comes daily to the directory.Some of
the files are not coming to the directory now.
I need to write a shell script to find the latest date and time of the files they
came to the directory. The files should be unique.... (1 Reply)
Discussion started by: karthicss
1 Replies
5. Shell Programming and Scripting
Hello all, this is my first post while i am trying to understand unix.
I would basically like to know if i can do this:
Lets say i have a folderA and folderB
And i save something in folderA
Can i make a script that checks folderA latest file, then compares it with the date of latest file in... (16 Replies)
Discussion started by: takissd
16 Replies
6. Shell Programming and Scripting
Hello
I have three directory structures for code releases.
Each directory structure looks like this:
bash-3.00$ ls -R | more
.:
Test_Release_1
Test_Release_2
Test_Release_3
./Test_Release_1/dbcode:
rp_online_import_srdp.pkb-1
srdp_ar_validation.pkb-1... (1 Reply)
Discussion started by: Glyn_Mo
1 Replies
7. Shell Programming and Scripting
Hi,
I have below two situations to handle,
1. I have list of files with file names having date&time. I have to backup to old date files. say I have below files in a directory,
1. XX123_20101004010101.dat
2. XX124_20101004010201.dat
3. XX121_20101003010101.dat
4.... (6 Replies)
Discussion started by: smr_rashmy
6 Replies
8. UNIX for Dummies Questions & Answers
ls -lrt | nawk -v D="$(date +'%b%e:'| sed 's/ //g')" 'D==$6$7":"{sub(".*"$9,$9);print}'
This picks only the latest files created based on the timestamp for that particular day..
how do i copy over the same files to a different location???? (1 Reply)
Discussion started by: win4luv
1 Replies
9. UNIX for Dummies Questions & Answers
Hi Folks,
I have one query that there is a folder in which daily several logs files are getting created , I reached to that location through putty but what I observer that 10 files of different date are been created with same name , what I need to see is the latest file ...let say the location is ... (5 Replies)
Discussion started by: KAREENA18
5 Replies
10. Shell Programming and Scripting
In linux.. In a directory there are 3 files which I want to copy only the latest file (ls -ltr myfiles*.txt|tail -1) to other directory in perl?
Could anyone please help me with the code?
Regards,
J (1 Reply)
Discussion started by: scriptscript
1 Replies
NCOPY(1) ncopy NCOPY(1)
NAME
ncopy - NetWare file copy
SYNOPSIS
ncopy -V
ncopy [ -vmMnpptu ] [ -s amount ] file destinationfile|directory
ncopy [ -vmMnpptu ] [ -s amount ] file1 [ file2 ... ] directory
ncopy -r [ -vmMnpptu ] [ -s amount ] srcdir dstdir
DESCRIPTION
With ncopy you can copy files to different locations on a single NetWare file server without generating excess network traffic. The pro-
gram uses a NetWare function to do the copy rather than transferring the file across the network for both the read and write.
If the last argument is a directory, ncopy will copy the source file(s) into the directory. If only two files are given and the last argu-
ment is not a directory, it will copy the source file to the destination file.
If the source and destination files are not on the same NetWare server (or are not on NetWare servers at all), ncopy will do a normal file
copy.
OPTIONS
-V
Show version number and exit
-v
Verbose copy. Will show current file and percentage completion.
-m
Copy MAC resource fork. Copies MAC resource fork together with data fork.
-M
Copy MAC resource fork to/from non-MAC filesystem. It expects/creates resource forks in subdirectory .rsrc of each directory copied.
If you want to copy files from MAC volume to .rsrc scheme, you must specify both options, -mM. It is not possible to create .rsrc direc-
tory on MAC-aware volume in one step, you must first copy data to non-MAC media using ncopy -mM and then copy them back using ncopy -M.
If you want to copy files from .rsrc scheme on MAC volume to real MAC multiple-forks file, you must first copy data to non-MAC filesys-
tem using ncopy -M and then copy them back using ncopy -mM.
-n
Nice NetWare copy. Will sleep for a second between copying blocks on the NetWare server. Gives other people a chance to do some work
on the NetWare server when you are copying large files. This has no effect if you are not copying on a NetWare server.
-s amount
Nice time slice factor. Used in conjunction with the -n option, this specifies the number of 100K blocks to copy before sleeping.
Default is 10. (1 Megabyte)
-p
Preserve file attributes and date/time during copy.
-pp
Preserve file attributes, date/time and owner during copy. Name of owner is preserved, not owner ID.
-t
Preserve trustees during copy. Trustee name is preserved, not ID.
-r
Perform recursive copy.
-u
Perform copy only if mtime or size differs.
BUGS
ncopy does not preserve long (MAC, NFS, FTAM, OS2) names during copy.
SEE ALSO
ncpmount(8), ncpumount(8)
CREDITS
ncopy was written by Brian G. Reid (breid@tim.com) and Tom C. Henderson (thenderson@tim.com). Many thanks to Volker Lendecke
(lendecke@math.uni-goettingen.de) for the ncpfs and ncplib which made ncopy possible. Some further work was done by Petr Vandrovec (van-
drove@vc.cvut.cz).
ncopy 17/03/1996 NCOPY(1)