Note that there are some explanatory texts on larger screens.

plurals
  1. POCount files by timestamp
    primarykey
    data
    text
    <p>I want to create a simple report that counts the files we receive from our suppliers. Each file is named after the airport (supplier) goods are shipped from i.e.</p> <pre><code>CUU~&lt;part_number&gt;~20120401.TXT YVR~&lt;part_number&gt;~20120402.TXT LAX~&lt;part_number&gt;~20120402.TXT </code></pre> <p>In a nutshell, the files we receive come to us in zipped form from a Microsoft Windows server. They get dropped on our Linux RH server and we decompress them with <code>unzip -o filename.zip -d target_directory</code>.</p> <p>My code looks into the target directory where the files are decompressed:</p> <pre><code> find . -name '*TXT' -exec ls '{}' \; |awk -F~ '{print $1"\t"$3}'|sort|uniq -c &gt;report.out </code></pre> <p>The output tells me that no files were received from YVR since March 22nd. Narrowing the search to <code>find . -name 'YVR*TXT'</code> produces the same result: no files since 3/22. </p> <p>My counterpart for YVR tells me that they FTPed files every day to us and emailed me his log file to prove it. I checked the FTP directory with the files are dropped and the permissions are all <code>+rwx</code>. I also checked the zip file contained the TXT files with <code>unzip -t zipfilename</code> and no problems are found.</p> <p>I want to try using the TXT file timestamp instead in my report but I am not clear how. What it the best way to make a report that counts the number of files received by day and by airport code?</p> <p>TIA,</p> <p>Chris.</p> <p>PS: My <code>find</code> has <code>printf</code> and my system has <code>stat</code>. Can I use either?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload