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 3217108
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:22:22+00:00 2026-05-17T15:22:22+00:00

I have a Data directory, that I rsync to a remote NAS periodically via

  • 0

I have a “Data” directory, that I rsync to a remote NAS periodically via a shell script.

However, I’d like to make this more efficient. I’d like to detect if something has changed in “Data” before running rsync. This is so that I don’t wake up the drives on the NAS unnecessarily.

I was thinking of modifying the shell script to get the latest modified time of the files in Data (by using a recursive find), and write that to a file every time Data is rsynced.

Before every sync, the shell script can compare the current timestamp of “Data” with the previous timestamp when “Data” was sync’d. If the current timestamp is newer, then rsync, otherwise do nothing.

My question is, is there a more efficient way to figure out if the “Data” directory is modified since the last rsync? Note that Data has many, many, layers of sub-directories.

  • 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-05-17T15:22:23+00:00Added an answer on May 17, 2026 at 3:22 pm

    If I understand correctly, you just want to see if any files have been modified so you can figure out whether to proceed to the rsync portion of your script?

    It’s a pretty simple task to figure out when the data was last synced, especially if you do this nightly. As soon as you find one file with mtime greater than the time of the last sync, you know you have to proceed to the full rsync.

    find has this functionality built in:

    # find all files modified in the last 24 hours
    find -mtime 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have data that looks like this: entities id name 1 Apple 2 Orange
I have data that looks like CUSTOMER, CUSTOMER_ID, PRODUCT ABC INC 1 XYX ABC
If I have data like this: Key Name 1 Dan 2 Tom 3 Jon
I have a bunch of files in a single directory that I would like
I just want to have a data directory in the project, and that it
I have data in this form, Article ID Company A Company B Company C
I have data from a table in a database (string) that contain text and
I have data that needs to be executed on a certain background thread. I
I often have data in Excel or text that I need to get into
I have stored the data into the plist(documents directory) and retrieved the data from

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.