02-07-2015
Ah yes that did the trick, thank you!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
This is probably simple so forgive me...
I just want to find all files in a folder created within the last 10 minutes...
This is easy:
# find /home/folder -cmin -10
If the find command locates any files created in the last ten minutes I want it to send an email alert.
I just want to... (3 Replies)
Discussion started by: gardellap
3 Replies
2. Shell Programming and Scripting
Hi
Purpose is to have a utility command to find and edit files .
I tried a function like the following in my .profile file
function vifind(){
find . -name $1 -print -exec vi {} \;
}
Is this correct? is there a better way to do it?
I see this behaving a bit strange in case of AIX, and... (6 Replies)
Discussion started by: grep_whoami
6 Replies
3. Shell Programming and Scripting
When I execute this line at the command prompt I get a different answer than when I run it in a script? Any ideas on how to resolve? I'm trying to find all files/dir in a directory except files that start with the word file.
Once I get this command to work, I will add the "delete" part to the... (6 Replies)
Discussion started by: blt123
6 Replies
4. Shell Programming and Scripting
Hi,
In an effort to collect all my .java-files and place them in a LaTeXfile (using the listings environment of latex), i tried to use ex.
So what i have now is:
find . -name "*\.java" > latex
ex latex <<HERE
%s/\(.*\)/\\lstinputlisting{\1}
wq
HERE
So i try to escape the '\' with... (1 Reply)
Discussion started by: HannesBBR
1 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I recently executed a find command that caused unexpected permission changes and we had to do a full system restore. Can someone please explain what this command would do?
find /staging/admin/scr * -exec chmod 755 '{}' +
It caused file permissions inside / to be modified strangely.
... (1 Reply)
Discussion started by: poornima
1 Replies
6. Shell Programming and Scripting
set -A allfiles `find $usrhtml -type f`
i am trying to populate this array with the find command. It works fine when find is looking through a single directory but when i add a new subdirectory the files in the subdirectory get duplicated. Can anyone help me and fix this so each files in... (1 Reply)
Discussion started by: bjhum33
1 Replies
7. Shell Programming and Scripting
Hi!
I made a shell script which is offering menu choice. I made it on RHEL & then with little bit changes I was able to run successfully on AIX/ksh.
Script is working fine with no issues other than a little one i.e., There is one choice in which I can list out and delete some files from a... (10 Replies)
Discussion started by: sukhdip
10 Replies
8. Shell Programming and Scripting
HI everyone,
I would like to have a script to run a certain linux command and mail the results or output of this command.
This shell is to be later on set as cronjob.
thanks in advance. (9 Replies)
Discussion started by: patrickminas
9 Replies
9. Shell Programming and Scripting
Hi,
I am trying to find files that are more than a gig with this command
find . -size +1073741823c and it just gives me the names of the files. How do i get it to give me the actual size of the files too?
---------- Post updated at 09:41 AM ---------- Previous update was at 09:37 AM... (2 Replies)
Discussion started by: LilyClaro
2 Replies
10. Shell Programming and Scripting
I want to remove any files that are older than 2 days from a directory. It deletes those files. Then it comes back with a message it is a directory. What am I doing wrong here?
+ find /mydir -mtime +2 -exec rm -f '{}' ';'
rm: /mydir is a directory (2 Replies)
Discussion started by: jtamminen
2 Replies
LEARN ABOUT PHP
escapeshellcmd
ESCAPESHELLCMD(3) 1 ESCAPESHELLCMD(3)
escapeshellcmd - Escape shell metacharacters
SYNOPSIS
string escapeshellcmd (string $command)
DESCRIPTION
escapeshellcmd(3) escapes any characters in a string that might be used to trick a shell command into executing arbitrary commands. This
function should be used to make sure that any data coming from user input is escaped before this data is passed to the exec(3) or system(3)
functions, or to the backtick operator.
Following characters are preceded by a backslash: #&;`|*?~<>^()[]{}$, x0A and xFF. ' and " are escaped only if they are not paired. In
Windows, all these characters plus % are replaced by a space instead.
PARAMETERS
o $command
- The command that will be escaped.
RETURN VALUES
The escaped string.
EXAMPLES
Example #1
escapeshellcmd(3) example
<?php
// We allow arbitrary number of arguments intentionally here.
$command = './configure '.$_POST['configure_options'];
$escaped_command = escapeshellcmd($command);
system($escaped_command);
?>
Warning
escapeshellcmd(3) should be used on the whole command string, and it still allows the attacker to pass arbitrary number of argu-
ments. For escaping a single argument escapeshellarg(3) should be used instead.
SEE ALSO
escapeshellarg(3), exec(3), popen(3), system(3), backtick operator.
PHP Documentation Group ESCAPESHELLCMD(3)