How to fetch a url with curl or wget silently


How to fetch a url with curl or wget silently


How to fetch a url with curl or wget silently

Cron jobs need quiet operation; if a command generates output, you’ll get an email from cron with the command output. So if you want to fetch a file silently with wget or curl, use a command like this:

curl –silent –output output_filename http://example.com/urltofetch.html

wget –quiet –output-document output_filename http://example.com/urltofetch.html

There are shorter versions of these options, but using the verbose options will make code or cron jobs easier to understand if you come back to them. Be aware that urls with “&” in them can confuse wget at least, so depending on your shell (bash, csh, tcsh), you may need to put single or double quotes around the url.

—————————————————————->

Bu cevap yeterince yardımcı oldu mu?

Diğer Dökümanlar


  • Network monitoring on Linux

    Network monitoring on Linux This post mentions some linux command line tools that can be used to monitor the network usage. These tools monitor the traffic flowing through network interfaces and...

  • df -i /tmp folder is full

    Install tmwatchftp://ftp.muug.mb.ca/mirror/centos/6.5/os/x86_64/Packages/tmpwatch-2.9.16-4.el6.x86_64.rpmthen run  /usr/sbin/tmpwatch -am 1 /tmp/nginx_clientthen add cron filelike this0 */1 *...

  • Accessing a Fedora Logical Volume from Ubuntu

    A while back, I started experimenting with Ubuntu after playing with Fedora. I decided to jump to Ubuntu and needed to move data from the Fedora-managed logical volume to Ubuntu. Here's what I...

  • How to create a partition size larger than 2TB on Linux

    How to create a partition size larger than 2TB on Linux Parted is a GNU utility and used to create, manipulate and delete the hard disk partitions. Select the drive that you need to create #...

  • RSZDT

    what is RSZDT mean ? PROCESS STATE CODES -different values that the s, stat and state output specifiers(header “STAT” or “S”) will display to describe the state of a...