03-10-2006
copy files with date
Hi,
I have a coupel of files in /tmp which I have to copy to /var. But I want their name to be same as the source with date suffix.
But the problem is I don;t know the prefix of the file, I only know the suffix of file.
AAA.997
ABC.997
ADC.997
The later part 997 is constant but the former part can be anything.
Is there any way that while making copy, I can find the prefix of file and then copy to /var as AAA.997.0310061430.
Thanks,
Inder
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have few webservers logs like access.log. which would be growing everyday.
what i do everyday is, take the backup of access.log as access.log_(currentdate) and nullify the access.log.
So thought of writing a script... but stuck up in middle.
My requirement: to take the backup and nullify... (6 Replies)
Discussion started by: logic0
6 Replies
2. Solaris
Dear all,
Can you help me in copying files newer than speciifc date
Thanks in advance,
Rajesh (3 Replies)
Discussion started by: RAJESHKANNA
3 Replies
3. UNIX for Advanced & Expert Users
When I do a ls -lt I get a list of files by date modified from newest to oldest. I would like to be able to copy some files to another directory using a date last modified range (i.e. Apr 30 - May 13) How could I do this?
Thanks,
Joe (4 Replies)
Discussion started by: geauxsaints
4 Replies
4. UNIX for Dummies Questions & Answers
Hi gurus,
I have set of files in a directory
ex : test_file1.csv
test_file2.csv
test_file3.csv
my requirement is to copy these files into another directory but with date appended to the name :
like after copying the files should look like : test_file1_07072008.csv
... (7 Replies)
Discussion started by: sish78
7 Replies
5. Shell Programming and Scripting
How to copy files from a location to a directory <YYMM> based on last modification date? This will need to run daily.
I want to copy those file for May to 0905 and Jun to 0906.
Appreciate your guidance.:) Thanks.
-rw-rw-rw- 1 ttusr tgrp 4514 May 29 21:49 AB24279J.lot_a... (17 Replies)
Discussion started by: KhawHL
17 Replies
6. Shell Programming and Scripting
Hi all
i am having so many files in my directory.Is there any option
to copy files based on date.
example
i am having file this
-rw-rw-r-- 1 ram user 1 Feb 2 17:12 abc
-rw-rw-r-- 1 ram user 1 Feb 2 17:12 bnw
-rwxrwxr-x 1 ram user 21122 Feb 4... (3 Replies)
Discussion started by: suryanarayana
3 Replies
7. Shell Programming and Scripting
Hi, I have a requirement to copy files from a windows network drive to a Linux server using shell script based on the last created date.
Ex:
FileName CreatedDate/Time
F1 05-01-2012 3:00 PM
F2 05-01-2012 3:15 PM
F3 05-01-2012 2:00 PM
When i run the shell script... (1 Reply)
Discussion started by: Lee_10
1 Replies
8. UNIX for Dummies Questions & Answers
I need to copy files from a directory that has a lot of files in it. However I only want to copy them from a certain date. My thoughts so far are to use ls -l and to pipe this into awk and print out tokens 6 (month)and 7 (day).
$ ls -l
-rw-r--r-- 1 prodqual tst 681883 Jun 12... (2 Replies)
Discussion started by: millsy5
2 Replies
9. Shell Programming and Scripting
i have directory /abcd and i want to copy all today date files in /xyz directory.
i am able to see the files by using below command but not able to understand copy.
find . -mtime -1 -type f -exec ls -l {} \; (2 Replies)
Discussion started by: learnbash
2 Replies
10. UNIX for Beginners Questions & Answers
Hi everyone :-)
I ran into a small issue. I would like to copy some files in the precise order they were created.
So the oldest files should be copied first and the newest ones last.
I tried cp -r $(ls -1t) ./destination but the files are still not sorted properly. I was thinking, that... (11 Replies)
Discussion started by: officiallyme
11 Replies
LEARN ABOUT CENTOS
indxbib
INDXBIB(1) General Commands Manual INDXBIB(1)
NAME
indxbib - make inverted index for bibliographic databases
SYNOPSIS
indxbib [ -vw ] [ -cfile ] [ -ddir ] [ -ffile ] [ -hn ] [ -istring ] [ -kn ] [ -ln ] [ -nn ] [ -ofile ] [ -tn ] [ filename... ]
DESCRIPTION
indxbib makes an inverted index for the bibliographic databases in filename... for use with refer(1), lookbib(1), and lkbib(1). The index
will be named filename.i; the index is written to a temporary file which is then renamed to this. If no filenames are given on the command
line because the -f option has been used, and no -o option is given, the index will be named Ind.i.
Bibliographic databases are divided into records by blank lines. Within a record, each fields starts with a % character at the beginning
of a line. Fields have a one letter name which follows the % character.
The values set by the -c, -n, -l and -t options are stored in the index; when the index is searched, keys will be discarded and truncated
in a manner appropriate to these options; the original keys will be used for verifying that any record found using the index actually con-
tains the keys. This means that a user of an index need not know whether these options were used in the creation of the index, provided
that not all the keys to be searched for would have been discarded during indexing and that the user supplies at least the part of each key
that would have remained after being truncated during indexing. The value set by the -i option is also stored in the index and will be
used in verifying records found using the index.
OPTIONS
It is possible to have whitespace between a command line option and its parameter.
-v Print the version number.
-w Index whole files. Each file is a separate record.
-cfile Read the list of common words from file instead of /usr/share/groff/1.22.2/eign.
-ddir Use dir as the pathname of the current working directory to store in the index, instead of the path printed by pwd(1). Usually dir
will be a symbolic link that points to the directory printed by pwd(1).
-ffile Read the files to be indexed from file. If file is -, files will be read from the standard input. The -f option can be given at
most once.
-istring
Don't index the contents of fields whose names are in string. Initially string is XYZ.
-hn Use the first prime greater than or equal to n for the size of the hash table. Larger values of n will usually make searching
faster, but will make the index larger and indxbib use more memory. Initially n is 997.
-kn Use at most n keys per input record. Initially n is 100.
-ln Discard keys that are shorter than n. Initially n is 3.
-nn Discard the n most common words. Initially n is 100.
-obasename
The index should be named basename.i.
-tn Truncate keys to n. Initially n is 6.
FILES
filename.i Index.
Ind.i Default index name.
/usr/share/groff/1.22.2/eign
List of common words.
indxbibXXXXXX Temporary file.
SEE ALSO
refer(1), lkbib(1), lookbib(1)
Groff Version 1.22.2 7 February 2013 INDXBIB(1)