09-03-2012
thanks, it works when i change to -name '*test*'
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All,
i am writing a shell script in korn shell
which deletes all the files in a directory
once in every 10DAYS.
the directory has different format files.
the script has something like this;
cd /home/data/pavi
echo "Please Enter the Number of Days to search for"
read DAYS... (2 Replies)
Discussion started by: pavan_test
2 Replies
2. UNIX for Advanced & Expert Users
Hi,
I'm using the following command to get a list of files on the system.
find /releases -type f -exec ls -l > /home/sebarry/list.txt '{}' \;
however, its searching a directory I don't want it to search so I know I have to use prune but I don't seem to be able to get prune and exec to work... (1 Reply)
Discussion started by: Sebarry
1 Replies
3. Shell Programming and Scripting
Hi People,
I have a directory full of compressed files (.Z extention)
In many of these files there is a string pattern (3800078163033)
I want to find all file names which contain this string in their text.
Regards,
Abhishek (2 Replies)
Discussion started by: max29583
2 Replies
4. Shell Programming and Scripting
Hi
I have a little problem with the find command in a script that I'm writing. The script should check if there are some files younger than 100 seconds and then syncronise them with rsync.
My find command:
find -type f -cmin -100 -exec rsync -a --delete directory1/ directory2/
When I... (8 Replies)
Discussion started by: oku
8 Replies
5. Shell Programming and Scripting
Hello All,
Is there a way to make exec do a couple of operations on a single input from find?
For example,
find . -type d -exec ls -l "{}" ";"
I would like to give the result of each "ls -l" in the above to a wc. Is that possible?
I want to ls -l | wc -l inside exec. How do I... (1 Reply)
Discussion started by: prasanna1157
1 Replies
6. Shell Programming and Scripting
Hi all,
Please could someone help with the following command requirement.
I basically need to find files NEWER than a given file and order the result on time.
My attempt so far is as follows:
find . -newer <file_name> -exec ls -lrt {} ;\
But I dont seem to get the right result... (12 Replies)
Discussion started by: jonnyd
12 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have two scripts that remove files. One works fine and is coded
find -name "syst*" -mtime +1 -exec rm {} \;
The other is almost the same - only thing missing is the '\'. On that script though I keep getting:
rm syst1202.file ?
etc
Does the \ make that difference or is it a... (3 Replies)
Discussion started by: Grueben
3 Replies
8. Shell Programming and Scripting
Hi all,
I am trying to find files newer than a given file and them mv them to a new location.
So I far I have:
find . ! -newer <file_name> -exec ls -l {} \;
and
find . ! -newer <file_name> -exec mv /TEMP_LOCATION {} \;
find is not liking this.
Anyone know how to modify the last... (2 Replies)
Discussion started by: jonnyd
2 Replies
9. Shell Programming and Scripting
Hello.
From a script, a command for a test is use :
find /home/user_install -maxdepth 1 -type f -newer /tmp/000_skel_file_deb ! -newer /tmp/000_skel_file_end -name '.bashrc' -o -name '.profile' -o -name '.gtkrc-2.0' -o -name '.i18n' -o -name '.inputrc'
Tha command... (3 Replies)
Discussion started by: jcdole
3 Replies
LEARN ABOUT FREEBSD
atf-test-program
ATF-TEST-PROGRAM(1) BSD General Commands Manual ATF-TEST-PROGRAM(1)
NAME
atf-test-program -- common interface to ATF test programs
SYNOPSIS
atf-test-program [-r resfile] [-s srcdir] [-v var1=value1 [.. -v varN=valueN]] test_case
atf-test-program -l
DESCRIPTION
Test programs written using the ATF libraries all share a common user interface, which is what this manual page describes. NOTE: There is no
binary known as atf-test-program; what is described in this manual page is the command-line interface exposed by the atf-c, atf-c++ and
atf-sh bindings.
In the first synopsis form, the test program will execute the provided test case and print its results to the standard output, unless other-
wise stated by the -r flag. Optionally, the test case name can be suffixed by ':cleanup', in which case the cleanup routine of the test case
will be executed instead of the test case body; see atf-test-case(4). Note that the test case is executed without isolation, so it can and
probably will create and modify files in the current directory. To execute test cases in a controller manner, you need a runtime engine that
understands the ATF interface. The recommended runtime engine is kyua(1). You should only execute test cases by hand for debugging pur-
poses.
In the second synopsis form, the test program will list all available test cases alongside their meta-data properties in a format that is
machine parseable. This list is processed by kyua(1) to know how to execute the test cases of a given test program.
The following options are available:
-l Lists available test cases alongside a brief description for each of them.
-r resfile Specifies the file that will receive the test case result. If not specified, the test case prints its results to stdout. If
the result of a test case needs to be parsed by another program, you must use this option to redirect the result to a file
and then read the resulting file from the other program. Note: do not try to process the stdout of the test case because
your program may break in the future.
-s srcdir The path to the directory where the test program is located. This is needed in all cases, except when the test program is
being executed from the current directory. The test program will use this path to locate any helper data files or utilities.
-v var=value Sets the configuration variable var to the value value.
SEE ALSO
kyua(1)
BSD
March 2, 2014 BSD