Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7960835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:52:13+00:00 2026-06-04T04:52:13+00:00

What have I tried so far… Command: find . -type f -ctime -3 |

  • 0

What have I tried so far…

Command:

find . -type f -ctime -3 | tail -n 5

Result:

./Mobilni Telefoni/01. Box Update/05. DC Unlocker Client/dc-unlocker_client-1.00.0857.exe
./Mobilni Telefoni/01. Box Update/39. Z3X Box/01. Update/01. Samsung Box/SamsungTool_12.4.exe
./Mobilni Telefoni/10. Nokia/1. SRPSKI  HRVATSKI  JEZICI/BB5/3xx_Series/Asha 300/06.97/rm781_06.97_ppm_d.rar
./GPS Navigacije/01. Garmin/03. Garmin Other/garmin_kgen_15.exe
./GPS Navigacije/01. Garmin/03. Garmin Other/test.txt

This output is OK, doesn’t work good if I put wider time span. (notice I use -ctime and not -mtime because some uploaded files are modified few years ago)

Problem is that files can be uploaded once a month, or once in a year, and I still need to get 10 latest files, regardless of time span.

If it can’t be done, does tail only limit output, or somehow just fetches number specified without huge performance impact on large number of files.

By using command from one answer on SO, I was able to get the files but some files were missing…

find . -type f -printf '%T@ %p\n' | sort -n | tail -10 | cut -f2- -d" "

Result:

./Mobilni Telefoni/11. Samsung/1. FLASH FILES/1. SRPSKI HRVATSKI JEZICI/E/E2330/E2330_OXFKE2.rar
./Mobilni Telefoni/11. Samsung/1. FLASH FILES/1. SRPSKI HRVATSKI JEZICI/E/E2330/FlashTool_E2_R6.zip
./Mobilni Telefoni/11. Samsung/1. FLASH FILES/1. SRPSKI HRVATSKI JEZICI/E/E210/E210_XFGH2.rar
./Mobilni Telefoni/05. iPhone/07. iFaith/iFaith-v1.4.1_windows-final.zip
./Mobilni Telefoni/05. iPhone/09. iPhone Browser/SetupiPhoneBrowser.1.93.exe
./Mobilni Telefoni/05. iPhone/10. iPhone_PC_Suite/iPhone_PC_Suite_Eng_v0.2.1.rar
./Mobilni Telefoni/05. iPhone/10. iPhone_PC_Suite/iPhone_PC_Suite_Ok.rar
./test
./Mobilni Telefoni/11. Samsung/1. FLASH FILES/1. SRPSKI HRVATSKI JEZICI/E/E2152/E2152_XXJH4_OXFJI2.zip.filepart
./GPS Navigacije/01. Garmin/03. Garmin Other/test.txt

File garmin_kgen_15.exe is missing because it was created in 2008, but it was uploaded in last 24 hours.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:52:14+00:00Added an answer on June 4, 2026 at 4:52 am

    I was told that this is the solution:

    find . -type f -printf "%C@ %p\n" | sort -rn | head -n 10
    

    The key point is the printf %C@ placeholder, which is the -ctime one. I found it by reading man find.

    Result:

    1336992789.0000000000 ./Mobilni Telefoni/05. iPhone/03. iPhone 4G Firmware/5.1.1/iPhone3,1_5.1.1_9B206_Restore.ipsw.filepart
    1336928538.0000000000 ./GPS Navigacije/01. Garmin/03. Garmin Other/test.txt
    1336922295.0000000000 ./GPS Navigacije/01. Garmin/03. Garmin Other/garmin_kgen_15.exe
    1336868365.0000000000 ./Mobilni Telefoni/11. Samsung/1. FLASH FILES/1. SRPSKI HRVATSKI JEZICI/E/E2152/E2152_XXJH4_OXFJI2.zip.filepart
    1336867426.0000000000 ./Mobilni Telefoni/11. Samsung/1. FLASH FILES/1. SRPSKI HRVATSKI JEZICI/E/E210/E210_XFGH2.rar
    1336866301.0000000000 ./Mobilni Telefoni/11. Samsung/1. FLASH FILES/1. SRPSKI HRVATSKI JEZICI/E/E2330/FlashTool_E2_R6.zip
    1336865921.0000000000 ./Mobilni Telefoni/11. Samsung/1. FLASH FILES/1. SRPSKI HRVATSKI JEZICI/E/E2330/E2330_OXFKE2.rar
    1336865409.0000000000 ./Mobilni Telefoni/11. Samsung/1. FLASH FILES/1. SRPSKI HRVATSKI JEZICI/E/E2230/E2230_XXKC1_CDS.zip
    1336865398.0000000000 ./Mobilni Telefoni/11. Samsung/1. FLASH FILES/1. SRPSKI HRVATSKI JEZICI/E/E2230/E2230_XXKC1_BIN.zip
    1336864949.0000000000 ./Mobilni Telefoni/11. Samsung/1. FLASH FILES/1. SRPSKI HRVATSKI JEZICI/E/E2230/E2230_OXFKC1_CSC.zip
    

    For a very large list of files, sort(1) with pipes might not be optimal for resource usage.

    sort(1) could be replaced with perl(1) and buffer the ten highest entries, only. This has been outlined in unix command: how to get top n records for three, here an adoption for ten records.

    It replaces the sort(1) and head(1) filters:

    find . -type f -printf "%C@ %p\n" | perl -ane '
        BEGIN {@top = ([-1]) x 10}
        if ($F[0] > $top[0][0]) {
            @top = sort {$a->[0] <=> $b->[0]} @top[1..9], [$F[0], $_];
        }
        END {print for reverse map {$_->[1]} @top}
    '
    

    The result is identical.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to compare varbinary type with byte array. I have tried so far:
Here is what I have tried thus far: > cd /Applications/MAMP/bin/php5/bin/ > ./pear channel-discover
I have tried several things so far, but I haven't had much luck yet.
Have tried to find solutions for this and can't really come up with anything.
Nothing I have tried so far has worked...
I have so far tried Editing php.ini to allow_url_open = on; I have tried
what I have tried so far here : http://jsfiddle.net/yusaf/VVEY9/26/ I have a problem with
Here's what I have tried so far. I'm just not too sure as to
This is what I have tried so far but with no success: std::string ReadPartial(
I have tried to find this online but without much luck. Stackoverflow also does

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.