01-20-2006
[CODE]
touch -t 01200000 newfile
find . ! -newer newfile
[CODE]
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hii all.
I have to get the date of the 7th day past from the current date.
if i give the current date as sep 3 then i must get the date as 27th of august.
can we get the values from the "cal" command.
cal | awk '{print $2}' will this type of command work.
actually my need is
if today is... (17 Replies)
Discussion started by: ladtony
17 Replies
2. Shell Programming and Scripting
Hi All,
I want to find the time diffrence between currnt time and "abc.txt" file create time.
I have solve that but if the abc.txt file created last month then is there any process to find the difftent?
Exp:
Create time of abc.txt is "Apr 14 06:48"
and currect date is "May 17 23:47".... (1 Reply)
Discussion started by: priyankak
1 Replies
3. Shell Programming and Scripting
Hi,
I have a fixed 4 files in each different directory. The total 17 directories are there each one having 4 files inside it. I need rename all of them with current date. The files formates will be as below:
Folder1:
abc_NOR_xyz_ddmmyyyy.txt
abc_NOR_ghij_ddmmyyyy.txt
Folder2:... (5 Replies)
Discussion started by: rjanardhan83
5 Replies
4. UNIX for Advanced & Expert Users
Normally we can use %s to find out the time in second since 1970.
But in my ksh, this format option is not available.
Example- date +%s
1268103151
above script command won't work in ksh. Can you guys provide its equivalent ? (3 Replies)
Discussion started by: boy18nj
3 Replies
5. 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
6. Shell Programming and Scripting
Hi,
I want to put script. The script is to show file that larger than 100MB include current date (eg: today date).
After find the date, it will compress list file and split the tar.gz file. Any idea how to do that?
This bash script will run auto everyday. It's will transfer will to other... (12 Replies)
Discussion started by: mzainal
12 Replies
7. Shell Programming and Scripting
Hi All,
I'm trying to find a file which is created on current day.... I searched in unix.com and i found, below command.
find /land/ -mtime -1 -type f -print | grep "FF_Member_STG.dat"
The command checks if the file with name "FF_Member_STG.dat" is created today then exit else proceed.
... (3 Replies)
Discussion started by: ace_friends22
3 Replies
8. Shell Programming and Scripting
Hi there!
I was wondering if someone could help me with the following:
I'm trying to find all files within a directory which have been modified since midnight of the current date.
Any help would be appreciated.
Thank you kindly. (6 Replies)
Discussion started by: Jimmy_the_tulip
6 Replies
9. UNIX for Beginners Questions & Answers
I am trying to work on a script where it is a *(star) delimited file has a multiple lines starts with RTG and 3rd column=TD8 I want to substring the date part and
I want to replace with currentdate minus 15 days. Here is an example. iam using AIX server
$ cat temp.txt
RTG*888*TD8*20180201~... (1 Reply)
Discussion started by: Shankar455
1 Replies
10. UNIX for Beginners Questions & Answers
Hello All,
we what we call a parameter file (.txt) where my application read dynamic values when the job is triggered, one of such values are below:
abc.txt
------------------
line1
line2
line3
$$EDWS_DATE_INSERT=08-27-2019
line4
$$EDWS_PREV_DATE_INSERT=08-26-2019
I am trying to... (1 Reply)
Discussion started by: pradeepp
1 Replies
CP(1) General Commands Manual CP(1)
NAME
cp, cpdir - file copy
SYNOPSIS
cp [-pifsmrRvx] file1 file2
cp [-pifsrRvx] file ... directory
cpdir [-ifvx] file1 file2
OPTIONS
-p Preserve full mode, uid, gid and times
-i Ask before removing existing file
-f Forced remove existing file
-s Make similar, copy some attributes
-m Merge trees, disable the into-a-directory trick
-r Copy directory trees with link structure, etc. intact
-R Copy directory trees and treat special files as ordinary
-v Display what cp is doing
-x Do not cross device boundaries
EXAMPLES
cp oldfile newfile # Copy oldfile to newfile
cp -R dir1 dir2 # Copy a directory tree
DESCRIPTION
Cp copies one file to another, or copies one or more files to a directory. Special files are normally opened and read, unless -r is used.
-r also copies the link structure, something -R doesn't care about. The -s option differs from -p that it only copies the times if the
target file already exists. A normal copy only copies the mode of the file, with the file creation mask applied. Set-uid bits are cleared
if the owner cannot be set. (The -s flag does not patronize you by clearing bits. Alas -s and -r are nonstandard.)
Cpdir is a convenient synonym for cp -psmr to make a precise copy of a directory tree.
SEE ALSO
cat(1), mkdir(1), rmdir(1), ln(1), rm(1).
CP(1)