PHP File Finding Signed Time shell_exec Versus exec Tutorial

PHP File Finding Signed Time shell_exec Versus exec Tutorial

PHP File Finding Signed Time shell_exec Versus exec Tutorial

The recent PHP File Finding shell_exec Versus exec Tutorial, on the Linux and/or unix and/or macOS side of functionality, did not factor in the choice of …

  • +
  • -

… signage possibilities for the “find” command we use via PHP’s exec function. The “man find” tells us

-atime n
File was last accessed less than, more than or exactly
n*24 hours ago. When find figures out how many 24-hour
periods ago the file was last accessed, any fractional
part is ignored, so to match -atime +1, a file has to have
been accessed at least two days ago.

… that not involving these “time signage” ideas (we add in a new dropdown), by choosing a blank sign could be causing you not to see files you expected if you had included one of these signs.

And so, feel free to try the changed find_minus.php‘s live run link also available here below.


Previous relevant PHP File Finding shell_exec Versus exec Tutorial is shown below.

PHP File Finding shell_exec Versus exec Tutorial

PHP File Finding shell_exec Versus exec Tutorial

Lots of software based desktop application problems are centred around the finding of files via a time based criteria. With this in mind, today, we combine …

… whether that be related to …

  • file modified time
  • file access time
  • file created time
  • file inode creation time

That sort of “find” file finding functionality find_minus.php‘s live run link can be a part of a “housekeeping” type of scheduled job, such as described via a crontab entry such as …


04 3 * * * ksh -c 'for i in `find ./PHP/animegif -name "0*.php" -mtime +7`; do rm -f $i; done'


Previous relevant PHP shell_exec Versus exec Tutorial is shown below.

PHP shell_exec Versus exec Tutorial

PHP shell_exec Versus exec Tutorial

Being suckers for “out of the box” solutions to programming issues, what comes “out of the box” with your (perhaps underlying) operating system of use is always inflicting “sucker punches” onto areas we didn’t know existed before … well, you had to be there, didn’t you?

That’s why we really like PHP’s “exec” and “passthru” that we have used quite a bit in the past, to get through to that underlying operating system set of commands in its command line environment, as applicable. Even mobile platforms get a go here, because PHP is a serverside language addressing the RJM Programming linux web server, though you can download s_e.php to your local (client) environment, and access a different perspective in an Apache/PHP/MySql local web server environment such as MAMP to work in.

Today, we compare “shell_exec” to “exec” with our proof of concept PHP web application we’ve written for you to try today, for you to see that “shell_exec” is everything “exec” is plus returning the entire command line command’s output, as distinct from the “just last line return” of exec …

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

This entry was posted in eLearning, Operating System, Tutorials and tagged , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>