{"id":55337,"date":"2022-04-09T03:01:18","date_gmt":"2022-04-08T17:01:18","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=55337"},"modified":"2022-04-08T16:09:30","modified_gmt":"2022-04-08T06:09:30","slug":"php-file-finding-shell_exec-versus-exec-contenteditable-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-file-finding-shell_exec-versus-exec-contenteditable-tutorial\/","title":{"rendered":"PHP File Finding shell_exec Versus exec Contenteditable Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP File Finding shell_exec Versus exec Contenteditable Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus_localhost.jpg\" title=\"PHP File Finding shell_exec Versus exec Contenteditable Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">PHP File Finding shell_exec Versus exec Contenteditable Tutorial<\/p><\/div>\n<p>Today&#8217;s enhancement of functionality to our <i>PHP File Finding shell_exec Versus exec<\/i> web application of yesterday&#8217;s <a title='PHP File Finding shell_exec Versus exec Event Tutorial' href='#phpff_vet'>PHP File Finding shell_exec Versus exec Event Tutorial<\/a> only kicks in for situations where you have downloaded the PHP code to an Apache\/PHP\/MySql local web server environment such as <a target=_blank title='MAMP for Apache\/PHP\/MySql on Mac OS X local web server' href='http:\/\/www.mamp.info'>MAMP<\/a> to work with, transferring PHP code to the relevant Document Root folder.  Why?  Well, a hacker may get ideas with the RJM Programming domain version of the web application, but presumably with any local web server version, it is in the control of the user to make use of three new HTML div <a target=_blank title='Global contenteditable attribute information from W3schools' href='https:\/\/www.w3schools.com\/tags\/att_global_contenteditable.asp'>contenteditable<\/a>=true user interaction sources &#8230;<\/p>\n<ol>\n<li>at the <i>.<\/i> as the directory specification (of the macOS or Linux or unix find command)<\/li>\n<li>at the -name &#8220;<i>*<\/i>&#8221; as the file specification (of the macOS or Linux or unix find command)<\/li>\n<li>at the end of the command (of the macOS or Linux or unix find command)<\/li>\n<\/ol>\n<p>This leaves a pretty open-ended scenario for your &#8220;command line&#8221; tragics out there, but definitely no place for &#8220;production code&#8221;!  But we do this, for you to try out <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php----GETME\" title=\"find_minus.php\">your changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php----GETME\" title=\"find_minus.php\">downloadable find_minus.php<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php\" title=\"Click picture\">live run link<\/a> also available <a href='#iffinds'>here below<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/php-file-finding-shell_exec-versus-exec-contenteditable-tutorial\/'>PHP File Finding shell_exec Versus exec Contenteditable Tutorial<\/a>.<\/p-->\n<hr>\n<p id='phpff_vet'>Previous relevant <a target=_blank title='PHP File Finding shell_exec Versus exec Event Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/php-file-finding-shell_exec-versus-exec-event-tutorial\/'>PHP File Finding shell_exec Versus exec Event Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP File Finding shell_exec Versus exec Event Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus_onclick.jpg\" title=\"PHP File Finding shell_exec Versus exec Event Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">PHP File Finding shell_exec Versus exec Event Tutorial<\/p><\/div>\n<p>Serverside PHP programming is great for programmers, in our opinion, because &#8230;<\/p>\n<ul>\n<li>it is so open to embellishing web applications with information from other sources of information from outside your own domain as well as underlying operating systems in that &#8220;serverside&#8221; role &#8230; and yet &#8230;<\/li>\n<li>it is not restricted from doing any of those Javascript &#8220;clientside&#8221; (perhaps event driven) functionalities that make for a dynamic web application<\/li>\n<\/ul>\n<p>Today we add event driven Javascript &#8220;clientside&#8221; logic on top of yesterday&#8217;s <a title='PHP File Finding shell_exec Versus exec Plus Tutorial' href='#phpff_vpt'>PHP File Finding shell_exec Versus exec Plus Tutorial<\/a>&#8216;s progress.<\/p>\n<p>We add &#8230;<\/p>\n<ul>\n<li>onmouseover (non-mobile only)<\/li>\n<li>onmouseout (non-mobile only)<\/li>\n<li>onclick<\/li>\n<\/ul>\n<p> &#8230; event logic to some of the cells (and their innards) of our <i>PHP File Finding shell_exec Versus exec<\/i> web application&#8217;s result set table of HTML elements.<\/p>\n<p>In amongst the &#8220;innards&#8221;, for &#8220;shell_exec&#8221; results, we have &#8220;pre&#8221; elements consisting of data records.  We allow onclick logics for those &#8220;pre&#8221; elements to host and <font color=blue>place <a target=_blank title='HTML mark element information from W3schools' href='https:\/\/www.w3schools.com\/tags\/tag_mark.asp'>mark<\/a> elements to match with click positioning<\/font> &#8230;<\/p>\n<p>&lt;?php echo &#8221;<br \/>\n<code><br \/>\n&lt;sc\" . \"ript type='text\/javascript'&gt;<br \/>\n var xx=null;<br \/>\n var ishover=false;<br \/>\n var lrect=null;<br \/>\n var rrect=null;<br \/>\n var pointerX=-1;<br \/>\n var pointerY=-1;<br \/>\n<br \/> <br \/>\n <font color=blue>function ldebate(inh) {<br \/>\n   var outh=inh;<br \/>\n   var outlines=inh.replace(\/\\&lt;br\\&gt;$\/g,'').split('&lt;br&gt;');<br \/>\n   var eachlineh=-1;<br \/>\n   var vsi=-1;<br \/>\n   if (lrect && eval('' + pointerY) &gt;= 0) {<br \/>\n     if (eval('' + pointerY) &gt;= eval('' + lrect.top) && eval('' + pointerY) &lt;= eval('' + lrect.bottom)) {<br \/>\n       eachlineh=eval(eval('' + lrect.height) \/ eval('' + outlines.length));<br \/>\n       vsi=Math.floor(eval(eval('' + pointerY) - eval('' + lrect.top)) \/ eachlineh);<br \/>\n       console.log('vsi=' + vsi + ' eachlineh=' + eachlineh + ' outlines.length=' + outlines.length + ' inh=' + inh);<br \/>\n       outh=inh.replace(outlines[vsi], '&lt;mark&gt;' + outlines[vsi] + '&lt;\/mark&gt;');<br \/>\n     }<br \/>\n   }<br \/>\n   return outh;<br \/>\n }<\/font><br \/>\n<br \/> <br \/>\n function onmout(one) {<br \/>\n   if (xx && ishover) {<br \/>\n     ishover=false;<br \/>\n     xx.close();<br \/>\n     xx=null;<br \/>\n   }<br \/>\n }<br \/>\n<br \/> <br \/>\n function onmo(event) {<br \/>\n   if (document && ('' + event.target.outerHTML).indexOf('&lt;\/pre&gt;') != -1) {<br \/>\n   ishover=true;<br \/>\n       if (event.touches) {<br \/>\n       if (event.touches[0].pageX) {<br \/>\n       pointerX = event.touches[0].pageX;<br \/>\n       pointerY = event.touches[0].pageY;<br \/>\n       } else {<br \/>\n       pointerX = event.touches[0].clientX;<br \/>\n       pointerY = event.touches[0].clientY;<br \/>\n       }<br \/>\n       } else if (event.clientX || event.clientY) {<br \/>\n        pointerX = event.clientX;<br \/>\n        pointerY = event.clientY;<br \/>\n       } else {<br \/>\n\t    pointerX = event.pageX;<br \/>\n\t    pointerY = event.pageY;<br \/>\n\t   }<br \/>\n   event.target.click();<br \/>\n   }<br \/>\n }<br \/>\n<br \/> <br \/>\n function windowopen(pone,ptwo,pthree) {<br \/>\n   if (xx) {<br \/>\n     xx.close();<br \/>\n     xx=null;<br \/>\n   }<br \/>\n   if (ishover) {<br \/>\n     ishover=false;<br \/>\n     return null;<br \/>\n   }<br \/>\n       if (event.touches) {<br \/>\n       if (event.touches[0].pageX) {<br \/>\n       pointerX = event.touches[0].pageX;<br \/>\n       pointerY = event.touches[0].pageY;<br \/>\n       } else {<br \/>\n       pointerX = event.touches[0].clientX;<br \/>\n       pointerY = event.touches[0].clientY;<br \/>\n       }<br \/>\n       } else if (event.clientX || event.clientY) {<br \/>\n        pointerX = event.clientX;<br \/>\n        pointerY = event.clientY;<br \/>\n       } else {<br \/>\n\t    pointerX = event.pageX;<br \/>\n\t    pointerY = event.pageY;<br \/>\n\t   }<br \/>\n   return window.open(pone,ptwo,pthree);<br \/>\n }<br \/>\n<br \/> <br \/>\n function xxdocumentwrite(thehtml) {<br \/>\n   document.getElementById('dinfo').innerHTML=thehtml;<br \/>\n   if (xx) {<br \/>\n     xx.document.write(thehtml);<br \/>\n   }<br \/>\n }<br \/>\n<br \/> <br \/>\n function thtitleit() {<br \/>\n   var ths=document.getElementsByTagName('th');<br \/>\n   for (var ij=0; ij&lt;ths.length; ij++) {<br \/>\n     ths[ij].title=('' + ths[ij].title).replace(\/\\`\/g,String.fromCharCode(34));<br \/>\n   }<br \/>\n }<br \/>\n<br \/> <br \/>\n function titleme(so) {<br \/>\n   if (so.value.indexOf('-mtime') != -1) {<br \/>\n     so.title='find via modified time switch';<br \/>\n   } else if (so.value.indexOf('-Btime') != -1) {<br \/>\n     so.title='find via file inode creation time switch';<br \/>\n   } else if (so.value.indexOf('-ctime') != -1) {<br \/>\n     so.title='find via created time switch';<br \/>\n   } else if (so.value.indexOf('-atime') != -1) {<br \/>\n     so.title='find via access time switch';<br \/>\n   }<br \/>\n }<br \/>\n<br \/> <br \/>\n function leftc(event) {<br \/>\n   if (!lrect) {<br \/>\n     lrect=event.target.getBoundingClientRect();<br \/>\n   }<br \/>\n   if (1 == 7) {<br \/>\n       if (event.touches) {<br \/>\n       if (event.touches[0].pageX) {<br \/>\n       pointerX = event.touches[0].pageX;<br \/>\n       pointerY = event.touches[0].pageY;<br \/>\n       } else {<br \/>\n       pointerX = event.touches[0].clientX;<br \/>\n       pointerY = event.touches[0].clientY;<br \/>\n       }<br \/>\n       } else if (event.clientX || event.clientY) {<br \/>\n        pointerX = event.clientX;<br \/>\n        pointerY = event.clientY;<br \/>\n       } else {<br \/>\n\t    pointerX = event.pageX;<br \/>\n\t    pointerY = event.pageY;<br \/>\n\t   }<br \/>\n   }<br \/>\n }<br \/>\n<br \/> <br \/>\n function rightc(event) {<br \/>\n   if (!rrect) {<br \/>\n     rrect=event.target.getBoundingClientRect();<br \/>\n   }<br \/>\n       if (event.touches) {<br \/>\n       if (event.touches[0].pageX) {<br \/>\n       pointerX = event.touches[0].pageX;<br \/>\n       pointerY = event.touches[0].pageY;<br \/>\n       } else {<br \/>\n       pointerX = event.touches[0].clientX;<br \/>\n       pointerY = event.touches[0].clientY;<br \/>\n       }<br \/>\n       } else if (event.clientX || event.clientY) {<br \/>\n        pointerX = event.clientX;<br \/>\n        pointerY = event.clientY;<br \/>\n       } else {<br \/>\n\t    pointerX = event.pageX;<br \/>\n\t    pointerY = event.pageY;<br \/>\n\t   }<br \/>\n }<br \/>\n&lt;\/scr\" . \"ipt&gt;<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<\/p>\n<p> &#8230; allowing the one HTML element have implicitly funnelled multiple &#8220;record&#8221; event driven functionality.<\/p>\n<p>Again, feel free to try <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php---GETME\" title=\"find_minus.php\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php---GETME\" title=\"find_minus.php\">find_minus.php<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php\" title=\"Click picture\">live run link<\/a> also available <a href='#iffinds'>here below<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/php-file-finding-shell_exec-versus-exec-event-tutorial\/'>PHP File Finding shell_exec Versus exec Event Tutorial<\/a>.<\/p-->\n<hr>\n<p id='phpff_vpt'>Previous relevant <a target=_blank title='PHP File Finding shell_exec Versus exec Plus Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/php-file-finding-shell_exec-versus-exec-plus-tutorial\/'>PHP File Finding shell_exec Versus exec Plus Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP File Finding shell_exec Versus exec Plus Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus_exec.jpg\" title=\"PHP File Finding shell_exec Versus exec Plus Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">PHP File Finding shell_exec Versus exec Plus Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='PHP File Finding Signed Time shell_exec Versus exec Tutorial' href='#phpffst_vt'>PHP File Finding Signed Time shell_exec Versus exec Tutorial<\/a>, and postings before it considered &#8220;exec&#8221; &#8230;<\/p>\n<ul>\n<li>to be related to the PHP function <a target=_blank title='PHP exec() method information' href='http:\/\/php.net\/manual\/en\/function.exec.php'>exec<\/a> <font size=1>(a favourite of ours)<\/font> &#8230; but then, we introduce today, the idea of &#8220;exec&#8221; as a &#8230;<\/li>\n<li>command line (on Linux or unix or macOS) <a target=_blank title='Linux find command information from computerhope' href='http:\/\/www.computerhope.com\/unix\/ufind.htm'>find<\/a> command switch &#8220;exec&#8221;<\/a> switch &#8230;<br \/>\n<blockquote cite='https:\/\/man7.org\/linux\/man-pages\/man1\/find.1.html'><p>\n       -exec command ;<br \/>\n              Execute command; true if 0 status is returned.  All<br \/>\n              following arguments to find are taken to be arguments to<br \/>\n              the command until an argument consisting of `;&#8217; is<br \/>\n              encountered.  The string `{}&#8217; is replaced by the current<br \/>\n              file name being processed everywhere it occurs in the<br \/>\n              arguments to the command, not just in arguments where it<br \/>\n              is alone, as in some versions of find.  Both of these<br \/>\n              constructions might need to be escaped (with a `\\&#8217;) or<br \/>\n              quoted to protect them from expansion by the shell.  See<br \/>\n              the EXAMPLES section for examples of the use of the -exec<br \/>\n              option.  The specified command is run once for each<br \/>\n              matched file.  The command is executed in the starting<br \/>\n              directory.  There are unavoidable security problems<br \/>\n              surrounding use of the -exec action; you should use the<br \/>\n              -execdir option instead.\n<\/p><\/blockquote>\n<\/li>\n<\/ul>\n<p> &#8230; that we start improving upon for those Linux or unix or macOS users to see information about via hovering over the &#8220;result set&#8221; table presented (via title attribute).<\/p>\n<p>So, feel free to try <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php--GETME\" title=\"find_minus.php\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php--GETME\" title=\"find_minus.php\">find_minus.php<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php\" title=\"Click picture\">live run link<\/a> also available <a href='#iffinds'>here below<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/php-file-finding-shell_exec-versus-exec-plus-tutorial\/'>PHP File Finding shell_exec Versus exec Plus Tutorial<\/a>.<\/p-->\n<hr>\n<p id='phpffst_vt'>Previous relevant <a target=_blank title='PHP File Finding Signed Time shell_exec Versus exec Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/php-file-finding-signed-time-shell_exec-versus-exec-tutorial\/'>PHP File Finding Signed Time shell_exec Versus exec Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP File Finding Signed Time shell_exec Versus exec Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus_st.jpg\" title=\"PHP File Finding Signed Time shell_exec Versus exec Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">PHP File Finding Signed Time shell_exec Versus exec Tutorial<\/p><\/div>\n<p>The recent <a title='PHP File Finding shell_exec Versus exec Tutorial' href='#phpff_vt'>PHP File Finding shell_exec Versus exec Tutorial<\/a>, on the Linux and\/or unix and\/or macOS side of functionality, did not factor in the choice of &#8230;<\/p>\n<ul>\n<li>+<\/li>\n<li>&#8211;<\/li>\n<\/ul>\n<p> &#8230; signage possibilities for the &#8220;find&#8221; command we use via PHP&#8217;s exec function.  The <a target=_blank title='man find' href='https:\/\/man7.org\/linux\/man-pages\/man1\/find.1.html'>&#8220;man find&#8221;<\/a> <font color=blue>tells us<\/font> &#8230;<\/p>\n<blockquote cite='https:\/\/man7.org\/linux\/man-pages\/man1\/find.1.html'><p>\n       -atime n<br \/>\n              File was last accessed less than, more than or exactly<br \/>\n              n*24 hours ago.  When find figures out how many 24-hour<br \/>\n              periods ago the file was last accessed, any fractional<br \/>\n              part is ignored, so to match -atime +1, a file has to have<br \/>\n              been accessed <font color=blue>at least<\/font> two days ago.\n<\/p><\/blockquote>\n<p> &#8230; that not involving these &#8220;time sign<font size=1>age<\/font>&#8221; ideas (we add in a new dropdown), by choosing a <i>blank sign<\/i> could be causing you not to see files you expected if you had included one of these signs.<\/p>\n<p>And so, feel free to try <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php-GETME\" title=\"find_minus.php\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php-GETME\" title=\"find_minus.php\">find_minus.php<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php\" title=\"Click picture\">live run link<\/a> also available <a href='#iffinds'>here below<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/php-file-finding-signed-time-shell_exec-versus-exec-tutorial\/'>PHP File Finding Signed Time shell_exec Versus exec Tutorial<\/a>.<\/p-->\n<hr>\n<p id='phpff_vt'>Previous relevant <a target=_blank title='PHP File Finding shell_exec Versus exec Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/php-file-finding-shell_exec-versus-exec-tutorial\/'>PHP File Finding shell_exec Versus exec Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP File Finding shell_exec Versus exec Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.jpg\" title=\"PHP File Finding shell_exec Versus exec Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">PHP File Finding shell_exec Versus exec Tutorial<\/p><\/div>\n<p>Lots of software based desktop application problems are centred around the <i>finding of files via a time based criteria<\/i>.  With this in mind, today, we combine &#8230;<\/i><\/p>\n<ul>\n<li>the PHP [<a target=_blank title='PHP exec() method information' href='http:\/\/php.net\/manual\/en\/function.shell-exec.php'>shell_<\/a>]<a target=_blank title='PHP exec() method information' href='http:\/\/php.net\/manual\/en\/function.exec.php'>exec<\/a> arrangements featuring in the day before yesterday&#8217;s <a title='PHP shell_exec Versus exec Tutorial' href='#php_vt'>PHP shell_exec Versus exec Tutorial<\/a> &#8230; with &#8230;<\/li>\n<li>the &#8220;smarts&#8221; (at least for macOS and unix\/linux underlying operating systems) for some time based <a target=_blank title='Linux find command information from computerhope' href='http:\/\/www.computerhope.com\/unix\/ufind.htm'>&#8220;find&#8221;<\/a> command filtering ideas<\/li>\n<\/ul>\n<p> &#8230; whether that be related to &#8230;<\/p>\n<ul>\n<li>file modified time<\/li>\n<li>file access time<\/li>\n<li>file created time<\/li>\n<li>file inode creation time<\/li>\n<\/ul>\n<p>That sort of &#8220;find&#8221; file finding functionality <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php_GETME\" title=\"find_minus.php\">find_minus.php<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php\" title=\"Click picture\">live run link<\/a> can be a part of a &#8220;housekeeping&#8221; type of scheduled job, such as described via a crontab entry such as &#8230;<\/p>\n<p><code><br \/>\n04 3 * * * ksh -c 'for i in `find .\/PHP\/animegif -name \"0*.php\" -mtime +7`; do rm -f $i; done'<br \/>\n<\/code><\/p>\n<p><iframe id=iffinds src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/find_minus.php\" style=\"width:100%;height:900px;\"><\/iframe><\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/php-file-finding-shell_exec-versus-exec-tutorial\/'>PHP File Finding shell_exec Versus exec Tutorial<\/a>.<\/p-->\n<hr>\n<p id='php_vt'>Previous relevant <a target=_blank title='PHP shell_exec Versus exec Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/php-shell_exec-versus-exec-tutorial\/'>PHP shell_exec Versus exec Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/s_e.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP shell_exec Versus exec Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/s_e.jpg\" title=\"PHP shell_exec Versus exec Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">PHP shell_exec Versus exec Tutorial<\/p><\/div>\n<p>Being suckers for &#8220;out of the box&#8221; solutions to programming issues, what comes &#8220;out of the box&#8221; with your (perhaps underlying) operating system of use is always inflicting &#8220;sucker punches&#8221; onto areas we didn&#8217;t know existed before <font size=1>&#8230; well, you had to be there, didn&#8217;t you?<\/font><\/p>\n<p>That&#8217;s why we really like PHP&#8217;s <a target=_blank title='PHP exec() method information' href='http:\/\/php.net\/manual\/en\/function.exec.php'>&#8220;exec&#8221;<\/a> and <a target=_blank title='PHP exec() method information' href='http:\/\/php.net\/manual\/en\/function.passthru.php'>&#8220;passthru&#8221;<\/a> 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 <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/s_e.php_GETME\" title=\"s_e.php\">s_e.php<\/a> to your local (client) environment, and access a different perspective in an Apache\/PHP\/MySql local web server environment such as <a target=_blank title='MAMP for Apache\/PHP\/MySql on Mac OS X local web server' href='http:\/\/www.mamp.info'>MAMP<\/a> to work in.<\/p>\n<p>Today, we compare <a target=_blank title='PHP exec() method information' href='http:\/\/php.net\/manual\/en\/function.shell-exec.php'>&#8220;shell_exec&#8221;<\/a> to &#8220;exec&#8221; with our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/s_e.php\">proof of concept PHP web application<\/a> we&#8217;ve written for you to try today, for you to see that &#8220;shell_exec&#8221; is everything &#8220;exec&#8221; is plus returning the entire command line command&#8217;s output, as distinct from the &#8220;just last line return&#8221; of exec  &#8230;<\/p>\n<p><iframe src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/s_e\/s_e.php\" style=\"width:100%;height:600px;\"><\/iframe><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55220' onclick='var dv=document.getElementById(\"d55220\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/exec\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55220' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55239' onclick='var dv=document.getElementById(\"d55239\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/find\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55239' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55323' onclick='var dv=document.getElementById(\"d55323\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/sign\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55323' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55327' onclick='var dv=document.getElementById(\"d55327\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/switch\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55327' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55334' onclick='var dv=document.getElementById(\"d55334\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/event\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55334' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55337' onclick='var dv=document.getElementById(\"d55337\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/contenteditable\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55337' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today&#8217;s enhancement of functionality to our PHP File Finding shell_exec Versus exec web application of yesterday&#8217;s PHP File Finding shell_exec Versus exec Event Tutorial only kicks in for situations where you have downloaded the PHP code to an Apache\/PHP\/MySql local &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-file-finding-shell_exec-versus-exec-contenteditable-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,29,37],"tags":[233,234,2442,1750,400,405,418,3944,435,714,744,885,2427,932,946,997,1122,3716,3942,3949,3950,3883,1279,1319,1411],"class_list":["post-55337","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-operating-system","category-tutorials","tag-command","tag-command-line","tag-contenteditable","tag-document-root","tag-event","tag-exec","tag-file","tag-file-finding","tag-find","tag-local-web-server","tag-mamp","tag-operating-system-2","tag-passthru","tag-php","tag-pipe","tag-programming","tag-server","tag-serverside","tag-shell_exec","tag-sign","tag-signed","tag-switch","tag-time","tag-tutorial","tag-web-server"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/55337"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=55337"}],"version-history":[{"count":8,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/55337\/revisions"}],"predecessor-version":[{"id":55347,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/55337\/revisions\/55347"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=55337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=55337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=55337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}