10-07-2008
find files from the past 7 days
Hi All,
I have a file which contains the listing of another directory:
>cat list.dat
-rwxr-xr-x 1 test staff 10240 Oct 02 06:53 test.txtdd
-rwxrwxrwx 1 test staff 0 Oct 04 07:22 test.txx
-rwxrwxrwx 1 test staff 132 Sep 16 2007 test_tt.sh
-rwxrwxrwx 1 test staff 193 Aug19 2007 test_ttt.sh
-rwxrwxrwx 1 test staff 45 Nov 21 2007 testfile.sh
-rw-r--r-- 1 test staff 10240 Apr 18 06:49 testtrar.tar
>
I need to extract the names of the files which are created in the last 7 days. So the output of the script will be lilke below from the above file:
-rwxr-xr-x 1 test staff 10240 Oct 02 06:53 test.txtdd
-rwxrwxrwx 1 test staff 0 Oct 04 07:22 test.txx
Is there any way to achieve this?
Thanks,
D
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to find files that have the ending of .out and that are older than 20 days. However, I cannot use find as I do not want to search in the directories that are underneath the directory that I am searching in.
How can this be done?? Find returns files that I do not want. (2 Replies)
Discussion started by: halo98
2 Replies
2. UNIX for Dummies Questions & Answers
I have a requirement which will select the files with a specific naming convention which got created in past 7 days in a specific directory.Lets say the directory is /data/XYZ and the file names follow the below nomenclature like Daily_File*.txt
I just need to create one CSV file which will... (12 Replies)
Discussion started by: dr46014
12 Replies
3. 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
4. Shell Programming and Scripting
Need to cpy those files which are created or modified in last 2 days.
bash$ ll -lrt
total 184
drwxr-xr-x 2 ons dce 256 Oct 12 06:58 files
-rw-r--r-- 1 ons dce 4313 Oct 14 06:06 cab.ksh
-rw-r--r-- 1 ons dce 6 Oct 14 07:03 Code.txt... (2 Replies)
Discussion started by: saluja.deepak
2 Replies
5. Shell Programming and Scripting
what is the find to command to find the files created last 30 days (5 Replies)
Discussion started by: rajkumar_g
5 Replies
6. Shell Programming and Scripting
Hi All,
I want to list file of LAST 7 days acc. to its modified date and then concatinate.
I have following piece of code..
For concatenate
cat file1 file2 >> Output (For concatinating)
find . -mtime -7 -exec basename {} \; (list past files but it is including . file also)
Plz... (4 Replies)
Discussion started by: vivek1489
4 Replies
7. UNIX and Linux Applications
One of my job is taking long running time.
I need to identify from the unix log file can you please help how to troubleshoot. (1 Reply)
Discussion started by: Nsharma3006
1 Replies
8. UNIX for Dummies Questions & Answers
Hello,
How to get the modified/created files past 2 hours in Solaris with find command?
Thank you. (7 Replies)
Discussion started by: balareddy
7 Replies
9. Shell Programming and Scripting
Hi ,
Can anyone help me how do perform below requirement in unix.
Step1:we will receive multiple files weekly with same name(as below) in a folder(In folder we will have other files also def.dat,ghf.dat)
Filenames:
1) abc_20171204_052389.dat
2)abc_20171204_052428.dat
DON'T modify... (23 Replies)
Discussion started by: sunnykamal59
23 Replies
LEARN ABOUT DEBIAN
go-testflag
GO-TESTFLAG(7) Miscellaneous Information Manual GO-TESTFLAG(7)
NAME
go - tool for managing Go source code
DESCRIPTION
The 'go test' command takes both flags that apply to 'go test' itself and flags that apply to the resulting test binary.
The test binary, called pkg.test, where pkg is the name of the directory containing the package sources, has its own flags:
-test.v
Verbose output: log all tests as they are run.
-test.run pattern
Run only those tests and examples matching the regular expression.
-test.bench pattern
Run benchmarks matching the regular expression. By default, no benchmarks run.
-test.cpuprofile cpu.out
Write a CPU profile to the specified file before exiting.
-test.memprofile mem.out
Write a memory profile to the specified file when all tests are complete.
-test.memprofilerate n
Enable more precise (and expensive) memory profiles by setting runtime.MemProfileRate. See 'godoc runtime MemProfileRate'. To pro-
file all memory allocations, use -test.memprofilerate=1 and set the environment variable GOGC=off to disable the garbage collector,
provided the test can run in the available memory without garbage collection.
-test.parallel n
Allow parallel execution of test functions that call t.Parallel. The value of this flag is the maximum number of tests to run
simultaneously; by default, it is set to the value of GOMAXPROCS.
-test.short
Tell long-running tests to shorten their run time. It is off by default but set during all.bash so that installing the Go tree can
run a sanity check but not spend time running exhaustive tests.
-test.timeout t
If a test runs longer than t, panic.
-test.benchtime n
Run enough iterations of each benchmark to take n seconds. The default is 1 second.
-test.cpu 1,2,4
Specify a list of GOMAXPROCS values for which the tests or benchmarks should be executed. The default is the current value of
GOMAXPROCS.
For convenience, each of these -test.X flags of the test binary is also available as the flag -X in 'go test' itself. Flags not listed
here are passed through unaltered. For instance, the command
go test -x -v -cpuprofile=prof.out -dir=testdata -update
will compile the test binary and then run it as
pkg.test -test.v -test.cpuprofile=prof.out -dir=testdata -update
AUTHOR
This manual page was written by Michael Stapelberg <stapelberg@debian.org>, for the Debian project (and may be used by others).
2012-05-13 GO-TESTFLAG(7)