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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:11:36+00:00 2026-05-12T14:11:36+00:00

I have a web server that saves the logs files of a web application

  • 0

I have a web server that saves the logs files of a web application numbered. A file name example for this would be:

dbsclog01s001.log
dbsclog01s002.log
dbsclog01s003.log

The last 3 digits are the counter and they can get sometime up to 100.

I usually open a web browser, browse to the file like:

http://someaddress.com/logs/dbsclog01s001.log

and save the files. This of course gets a bit annoying when you get 50 logs.
I tried to come up with a BASH script for using wget and passing

http://someaddress.com/logs/dbsclog01s*.log

but I am having problems with my the script.
Anyway, anyone has a sample on how to do this?

thanks!

  • 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-12T14:11:36+00:00Added an answer on May 12, 2026 at 2:11 pm
    #!/bin/sh
    
    if [ $# -lt 3 ]; then
            echo "Usage: $0 url_format seq_start seq_end [wget_args]"
            exit
    fi
    
    url_format=$1
    seq_start=$2
    seq_end=$3
    shift 3
    
    printf "$url_format\\n" `seq $seq_start $seq_end` | wget -i- "$@"
    

    Save the above as seq_wget, give it execution permission (chmod +x seq_wget), and then run, for example:

    $ ./seq_wget http://someaddress.com/logs/dbsclog01s%03d.log 1 50
    

    Or, if you have Bash 4.0, you could just type

    $ wget http://someaddress.com/logs/dbsclog01s{001..050}.log
    

    Or, if you have curl instead of wget, you could follow Dennis Williamson’s answer.

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

Sidebar

Related Questions

I have this senario. We have an application server that contains a few web
I have a folder on my web server that has hundreds of mp3 files
I have an Asp.Net MVC application that works in the vs.net development web server.
I have a web server which saves cache files and keeps them for 7
Problem: I have web server that was recently compromised. They targeted javascript files. They
I have a program that downloads PCM data from a Web Server, which it
I have a program that is supposed to interact with a web server and
I have a GUI that is issuing commands to a web server based on
I read that when you don't have access to the web server's headers you
We have an ASP.Net MVC project that will start with a single web server

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.