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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:44:13+00:00 2026-06-14T13:44:13+00:00

I do something like wget –user=userName –password=passWord –timestamping https://url.to/a/file.csv.gz gzip -cd file.csv.gz > file.csv

  • 0

I do something like

wget --user=userName --password=passWord  --timestamping https://url.to/a/file.csv.gz
gzip -cd file.csv.gz > file.csv

(not tested)

Please note that the server requires authentication.

The file will only be downloaded, if it’s newer than the local file. This is good.

However, also line 2 should only be executed if the remote file is newer than the local file.

How can I do that?

  • 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-14T13:44:14+00:00Added an answer on June 14, 2026 at 1:44 pm

    Just test to see if the modification time of the file.csv.gz is newer than the file.csv.

    On Linux:

    if [ $(stat -c '%Y' file.csv.gz) -gt $(stat -c '%Y' file.csv) ]; then
        gzip -cd file.csv.gz > file.csv
    fi
    

    On BSD (like Mac OS X):

    if [ $(stat -f '%m' file.csv.gz) -gt $(stat -f '%m' file.csv) ]; then
        gzip -cd file.csv.gz > file.csv
    fi
    

    Other systems may have different arguments to stat; check man stat on your system, or help stat if it’s a shell builtin.

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

Sidebar

Related Questions

I use: wget --no-check-certificate --http-user=user --http-password=secret --header=Content-Type:text/xml --post-file=request.xml https://mydominain.com/xml to send an xml request.
thank you for reading. For a shell command to wget, something like this works:
Something like: for (a,b) in kwargs.iteritems(): if not b : del kwargs[a] This code
Something like this: if self.__class__ == User: logging.debug(%s non_pks were found % (str(len(non_pks))) )
Something like: SELECT MONTH(*date?*) FROM //Not sure what goes here LIMIT 0,6 I know
I'm looking for a secure alternative to doing something like this, wget --mirror --preserve-permissions
I have a .php file that I would like wget to download, it will
Something like the following will not give me a compile-time or runtime error and
I'm trying to make a bash script where I would something like wget -O
Something like this: _declspec(align(16)) float dens[4]; //Here the code comes. F32vec4 S_START, Pos, _Vector

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.