GNU find 4.4.2 on linux works as expected:
Of course in the command above the ls "-rt" options are meaningless, since ls is run once for every file found. This below is good:
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)
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)
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)
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)
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)
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)
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)
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)
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 DEBIAN
aa-exec
AA-EXEC(8) AppArmor AA-EXEC(8)NAME
aa-exec - confine a program with the specified AppArmor profile
SYNOPSIS
aa-exec [options] [--] [<command> ...]
DESCRIPTION
aa-exec is used to launch a program confined by the specified profile and or namespace. If both a profile and namespace are specified
command will be confined by profile in the new policy namespace. If only a namespace is specified, the profile name of the current
confinement will be used. If neither a profile or namespace is specified command will be run using standard profile attachment (ie. as if
run without the aa-exec command).
If the arguments are to be pasted to the <command> being invoked by aa-exec then -- should be used to separate aa-exec arguments from the
command.
aa-exec -p profile1 -- ls -l
OPTIONS aa-exec accepts the following arguments:
-p PROFILE, --profile=PROFILE
confine <command> with PROFILE. If the PROFILE is not specified use the current profile name (likely unconfined).
-n NAMESPACE, --namespace=NAMESPACE
use profiles in NAMESPACE. This will result in confinement transitioning to using the new profile namespace.
-f FILE, --file=FILE
a file or directory containing profiles to load before confining the program.
-i, --immediate
transition to PROFILE before doing executing <command>. This subjects the running of <command> to the exec transition rules of the
current profile.
-v, --verbose
show commands being performed
-d, --debug
show commands and error codes
-- Signal the end of options and disables further option processing. Any arguments after the -- are treated as arguments of the command.
This is useful when passing arguments to the <command> being invoked by aa-exec.
BUGS
If you find any bugs, please report them at <http://https://bugs.launchpad.net/apparmor/+filebug>.
SEE ALSO aa-stack(8), aa-namespace(8), apparmor(7), apparmor.d(5), aa_change_profile(3), aa_change_onexec(3) and <http://wiki.apparmor.net>.
AppArmor 2.7.103 2012-06-28 AA-EXEC(8)