<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>curl Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/curl/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Mon, 09 Nov 2020 15:32:51 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>Terminal Tools for Downloading Files</title>
		<link>https://www.osradar.com/terminal-tools-downloading-files/</link>
					<comments>https://www.osradar.com/terminal-tools-downloading-files/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Sat, 07 Nov 2020 02:34:00 +0000</pubDate>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[wget]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=25194</guid>

					<description><![CDATA[<p>Throughout our posts, we have downloaded many files via the terminal but have never made an envelope post. So in this post, we&#8217;ll tell you all the details about Terminal Tools for Downloading Files. When referring to downloading files, the first thing we can think of is the web browser. This is true up to [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/terminal-tools-downloading-files/">Terminal Tools for Downloading Files</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Throughout our posts, we have downloaded many files via the terminal but have never made an envelope post. So in this post, we&#8217;ll tell you all the details about Terminal Tools for Downloading Files.</p>



<p>When referring to downloading files, the first thing we can think of is the web browser. This is true up to a point. Because in the terminal we also have many options for downloading.</p>



<p>The Linux Terminal is a powerful tool so much so that it is the main working support for many servers. Therefore, the terminal is fast, secure, and efficient.</p>



<p>So, let&#8217;s talk about those tools.</p>



<h2>Terminal Tools for Downloading Files</h2>



<p>Several tools allow a download without major problems, but we will name the most familiar and easy to use.</p>



<h3>1.- The great wget</h3>



<p><a href="https://www.gnu.org" target="_blank" rel="noreferrer noopener">GNU</a> wget is a CLI (command-line interface) utility that allows you to download files from the internet if you know its link. It is very efficient in the management of computer resources because it is practically unnoticeable its use. In addition, this allows you to rename the downloaded files quickly.</p>



<p>On the other hand, although it is a program that is used in the terminal, it is quite complete. Here is a list of the main features of the application:</p>



<ul><li>Wget supports downloads through proxies</li><li>IPv6 is fully supported by wget.</li><li>It allows limiting the bandwidth used for downloads.</li><li>Wget works with SSL/TSL to secure downloads.</li></ul>



<p>But Wget has many configurations and work options. So many that we made a post about it:</p>



<p><a href="https://www.osradar.com/the-wget-command/" target="_blank" rel="noreferrer noopener">The Wget Command</a></p>



<p>There you can learn even more about Wget and above all how to use it.</p>



<h3>2.- cURL</h3>



<p>Another veteran of our site is cURL.</p>



<p><a href="https://curl.haxx.se/">CURL</a> is a command line tool and library for transferring data with URLs. Many download scripts or file transfers use CURL as a means to achieve this. In addition, CURL supports FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP and many other protocols quite popular on networks.</p>



<p>On the other hand, the use of CURL is not limited exclusively to computers but to other devices that use UNIX such as cell phones, cars and is the transfer backend of many of the most popular applications in the world.</p>



<p>Say that cURL is even more advanced than Wget but you also have other additional features.</p>



<p>So, if you want to learn more about it, check our post:</p>



<p><a href="https://www.osradar.com/how-to-use-curl-command-linux/" target="_blank" rel="noreferrer noopener">How to use CURL command on Linux?</a></p>



<h3>3.- Terminal Tools for Downloading Files used on Scripts</h3>



<p>It is also possible to find other tools that are in the main repositories of most Linux distributions. We are talking about tools like rsync or scp.</p>



<p>Rsync, remote synchronize is known as a remote synchronization function of the software, it synchronizes files at the same time, can maintain the original file permissions, time, hard and soft links and other additional information. it is a “sync algorithm” that provides a quick way to synchronize files between clients and remote file servers, and can also be transferred via SSH, which is also very confidential, supports breakpoint continuation, data can be pushed or pulled, and is free of chargeS.</p>



<p>Rsync advantages：</p>



<ul><li>Ability to update entire directories and trees and file systems;</li><li>Selectively maintain symbolic links, hard links, file ownership, permissions, devices, and time for folders and files;</li><li>For installation, there are no special permission requirements;</li><li>For multiple files, the internal pipeline reduces the file wait delay;</li><li>Can use RSH, SSH or direct port as the transfer port;</li><li>Support anonymous Rsync synchronization files are the ideal mirror tool;</li></ul>



<p>You can read:</p>



<p><a href="https://www.osradar.com/synchronous-data-using-rsync-command-in-linux/" target="_blank" rel="noreferrer noopener">Synchronous data Using rsync Command in Linux</a></p>



<p>Although it is true that with Rsync we do not make a download itself, it can help us to copy and synchronize files from a server. What in practice can be considered a download.</p>



<p>On the other hand, <strong>scp is a variation of the cp command that allows you to copy files over a network</strong>. As with Rsync it is not a download but in practice it allows us to do it. Especially when we have access to certain files from a given server.</p>



<h2>Conclusion</h2>



<p>The terminal is a marvel in Linux and so much so that you can download files from the internet or a network using commands. This is useful on servers or computers with ssh connections.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/terminal-tools-downloading-files/">Terminal Tools for Downloading Files</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/terminal-tools-downloading-files/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install cURL in Windows.</title>
		<link>https://www.osradar.com/how-to-install-curl-in-windows/</link>
					<comments>https://www.osradar.com/how-to-install-curl-in-windows/#respond</comments>
		
		<dc:creator><![CDATA[roger]]></dc:creator>
		<pubDate>Fri, 29 Nov 2019 11:36:00 +0000</pubDate>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[Windows 10]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=16051</guid>

					<description><![CDATA[<p>Hello, how are you? Today we are going to talk about cURL. This is a library of functions to connect to servers to work with them. The work is done in URL format. That is to say, it is used to perform actions on files in Internet URLs, supporting the most common protocols, such as [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-curl-in-windows/">How to install cURL in Windows.</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Hello, how are you? Today we are going to talk about cURL. This is a library of functions to connect to servers to work with them. The work is done in URL format. That is to say, it is used to perform actions on files in Internet URLs, supporting the most common protocols, such as http, ftp, https, etc. Moreover, is a software project consisting of a library (libcurl) and a command interpreter (curl) oriented file transfer. Its primary use is to automate unsupervised file transfers or sequences of operations. In addition, it integrates with PHP, so its libraries can also be used from PHP scripts. The only requirement is that PHP must be installed with cURL support. Consequently, in this post, we are going to see how to install cURL in Windows.</p>



<h2>Download cURL for Windows.</h2>



<p>The first thing we have to do is go to this <a rel="noreferrer noopener" aria-label="website (opens in a new tab)" href="https://winampplugins.co.uk/curl/" target="_blank">website</a> and download the corresponding version. </p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="728" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/curl.jpg" alt="Download the version corresponding to the computer architecture." class="wp-image-16053" srcset="https://www.osradar.com/wp-content/uploads/2019/11/curl.jpg 1024w, https://www.osradar.com/wp-content/uploads/2019/11/curl-300x213.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/11/curl-768x546.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/11/curl-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2019/11/curl-696x495.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/11/curl-591x420.jpg 591w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Download the version corresponding to the computer architecture.</figcaption></figure>



<p>Then unzip it at the root of the Windows installation. Also, for ease of use assign a simple name to the folder. In my case, I chose <em>curl</em>:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="728" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/curl2.jpg" alt="Unzip the folder at the root of the Windows installation" class="wp-image-16054" srcset="https://www.osradar.com/wp-content/uploads/2019/11/curl2.jpg 1024w, https://www.osradar.com/wp-content/uploads/2019/11/curl2-300x213.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/11/curl2-768x546.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/11/curl2-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2019/11/curl2-696x495.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/11/curl2-591x420.jpg 591w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Unzip the folder at the root of the Windows installation</figcaption></figure>



<h2>Testing the installation.</h2>



<p>The first thing you have to do is open a Command Prompt. With this intention press the Win+R combination and run cmd. Then navigate to the folder you unzipped by typing the following commands:</p>



<pre class="wp-block-preformatted">cd..
cd..
cd curl</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="979" height="512" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/curl7.jpg" alt="Entering the curl folder." class="wp-image-16055" srcset="https://www.osradar.com/wp-content/uploads/2019/11/curl7.jpg 979w, https://www.osradar.com/wp-content/uploads/2019/11/curl7-300x157.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/11/curl7-768x402.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/11/curl7-696x364.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/11/curl7-803x420.jpg 803w" sizes="(max-width: 979px) 100vw, 979px" /><figcaption>Entering the curl folder.</figcaption></figure>



<p>To test the cURL installation please run the following command:</p>



<pre class="wp-block-preformatted">curl -V</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="728" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/curl3.jpg" alt="Checking the cURL version" class="wp-image-16056" srcset="https://www.osradar.com/wp-content/uploads/2019/11/curl3.jpg 1024w, https://www.osradar.com/wp-content/uploads/2019/11/curl3-300x213.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/11/curl3-768x546.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/11/curl3-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2019/11/curl3-696x495.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/11/curl3-591x420.jpg 591w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Checking the cURL version</figcaption></figure>



<p>Now let&#8217;s try a popular site, like google. With this in mind, please run the following command:</p>



<pre class="wp-block-preformatted">curl https://www.google.com</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="979" height="512" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/curl4.jpg" alt="Testing cURL on google.com" class="wp-image-16057" srcset="https://www.osradar.com/wp-content/uploads/2019/11/curl4.jpg 979w, https://www.osradar.com/wp-content/uploads/2019/11/curl4-300x157.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/11/curl4-768x402.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/11/curl4-696x364.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/11/curl4-803x420.jpg 803w" sizes="(max-width: 979px) 100vw, 979px" /><figcaption>Testing cURL on google.com</figcaption></figure>



<h2>Adding the environment variable.</h2>



<p>To be able to run curl, it is necessary to go to the program directory and from there run the commands. If we want to avoid this, it is necessary to edit the environment variables. In addition, add a new variable to the PATH environment. If you want to know how to do it, please see <a rel="noreferrer noopener" aria-label="here (opens in a new tab)" href="https://www.osradar.com/how-to-install-wget-in-windows-10/" target="_blank">here</a>. In this case, I only show you that the path you have to add is <strong>C:\curl</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="768" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/curl5.jpg" alt="Adding the environment variable." class="wp-image-16059" srcset="https://www.osradar.com/wp-content/uploads/2019/11/curl5.jpg 1024w, https://www.osradar.com/wp-content/uploads/2019/11/curl5-300x225.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/11/curl5-768x576.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/11/curl5-80x60.jpg 80w, https://www.osradar.com/wp-content/uploads/2019/11/curl5-265x198.jpg 265w, https://www.osradar.com/wp-content/uploads/2019/11/curl5-696x522.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/11/curl5-560x420.jpg 560w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Adding the environment variable.</figcaption></figure>



<p>From now on we can run cURL from any Command Prompt. It is no longer necessary to scroll to the installation address.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="979" height="512" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/curl6.jpg" alt="Running cURL from a CMD " class="wp-image-16062" srcset="https://www.osradar.com/wp-content/uploads/2019/11/curl6.jpg 979w, https://www.osradar.com/wp-content/uploads/2019/11/curl6-300x157.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/11/curl6-768x402.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/11/curl6-696x364.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/11/curl6-803x420.jpg 803w" sizes="(max-width: 979px) 100vw, 979px" /><figcaption>Running cURL from a CMD </figcaption></figure>



<p> In conclusion, we have seen how to install cURL on Windows. From now on you can use it to test HTTP requests. Also, as a programmer it is possible to use all the advantages it offers. All right, that&#8217;s it for now. Greetings!</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-curl-in-windows/">How to install cURL in Windows.</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-curl-in-windows/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Using HTTPie on Linux</title>
		<link>https://www.osradar.com/using-httpie-on-linux/</link>
					<comments>https://www.osradar.com/using-httpie-on-linux/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Sun, 27 Jan 2019 02:33:55 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[command tool]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[httpie]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=9833</guid>

					<description><![CDATA[<p>If you are a sysadmin or you are starting to be a sysadmin, it is normal to use the terminal too much. And you know that the terminal is one of the most powerful tools in all of Linux. Recently I showed you the many things that can be done with CURL and we even [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/using-httpie-on-linux/">Using HTTPie on Linux</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>If you are a sysadmin or you are starting to be a sysadmin, it is normal to use the terminal too much. And you know that the terminal is one of the most powerful tools in all of Linux. Recently I showed you the many things that can be done with <a href="https://www.osradar.com/how-to-use-curl-command-linux/" target="_blank" rel="noreferrer noopener" aria-label="CURL (opens in a new tab)">CURL</a> and we even use it a lot in our tutorials. However, there is an application that pretends to be a reliable alternative to CURL. So, in this post, I will tell you about HTTPie. Using HTTPie is simple, you will see.</p>



<p>HTTPie is a <a href="https://httpie.org/" target="_blank" rel="noreferrer noopener" aria-label="command (opens in a new tab)">command</a> line HTTP client with an intuitive UI, JSON support, syntax highlighting, wget-like downloads, plugins, and more. Its goal is to make CLI interaction with web services as human-friendly as possible. In addition, HTTPie can be used for testing, debugging, and generally interacting with HTTP servers.</p>



<p>The mainly features are:</p>



<ul>
<li>Wget-like downloads.</li>
<li>Python 2.7 and 3.x support.</li>
<li>Linux, macOS and Windows support.</li>
<li>Plugins.</li>
<li>Sensible defaults.</li>
<li>Expressive and intuitive command syntax.</li>
<li>Colorized and formatted terminal output.</li>
<li>Built-in JSON support.</li>
<li>Persistent sessions.</li>
<li>Forms and file uploads.</li>
</ul>



<p>So, let us start.</p>



<h2>Installing HTTPie</h2>



<p>HTTPie is an application that is available in the main repositories of most Linux distributions. So, there is no major complication.</p>



<p>If you are using Debian, Ubuntu or derivates:</p>



<pre class="wp-block-preformatted">sudo apt install httpie</pre>



<p>So, in case you are using Fedora:</p>



<pre class="wp-block-preformatted">sudo dnf install httpie</pre>



<p>On CentOS / and RHEL:</p>



<pre class="wp-block-preformatted">sudo yum install httpie</pre>



<p>Finally, if you are using Arch Linux o derivates:</p>



<pre class="wp-block-preformatted">sudo pacman -S httpie</pre>



<figure class="wp-block-image"><img loading="lazy" width="864" height="316" class="wp-image-9835" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/01/1-19.png" alt="Install httpie" srcset="https://www.osradar.com/wp-content/uploads/2019/01/1-19.png 864w, https://www.osradar.com/wp-content/uploads/2019/01/1-19-300x110.png 300w, https://www.osradar.com/wp-content/uploads/2019/01/1-19-768x281.png 768w, https://www.osradar.com/wp-content/uploads/2019/01/1-19-696x255.png 696w" sizes="(max-width: 864px) 100vw, 864px" />
<figcaption>Install httpie</figcaption>
</figure>



<h2>Using HTTPie on Linux</h2>



<p>HTTPie is not complicated to use. On the contrary, its syntax is quite simple to take advantage of. Its syntax is mainly like this:</p>



<pre class="wp-block-preformatted">http [flags] [METHOD] URL [ITEM [ITEM]]</pre>



<p>However, if you run the following command, you will see all the options.</p>



<pre class="wp-block-preformatted">http --help</pre>



<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" width="1024" height="576" class="wp-image-9836" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/01/2-20-1024x576.png" alt="Showing the HTTPie help" srcset="https://www.osradar.com/wp-content/uploads/2019/01/2-20-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2019/01/2-20-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2019/01/2-20-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2019/01/2-20-696x391.png 696w, https://www.osradar.com/wp-content/uploads/2019/01/2-20-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2019/01/2-20-747x420.png 747w, https://www.osradar.com/wp-content/uploads/2019/01/2-20.png 1366w" sizes="(max-width: 1024px) 100vw, 1024px" />
<figcaption>Showing the HTTPie help</figcaption>
</figure>
</div>



<p>Let us see some examples.</p>



<h3><strong>Basic usage</strong></h3>



<p>The most basic way to use HTTPie is as follows:</p>



<pre class="wp-block-preformatted">http somepage.com</pre>



<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" width="433" height="219" class="wp-image-9837" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/01/3-20.png" alt="Basic usage" srcset="https://www.osradar.com/wp-content/uploads/2019/01/3-20.png 433w, https://www.osradar.com/wp-content/uploads/2019/01/3-20-300x152.png 300w" sizes="(max-width: 433px) 100vw, 433px" />
<figcaption>Basic usage</figcaption>
</figure>
</div>



<p>You can add th -v option to see other information about the site.</p>



<pre class="wp-block-preformatted">http -v somepage.com</pre>



<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" width="389" height="157" class="wp-image-9838" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/01/4-22.png" alt="Add a option to the command" srcset="https://www.osradar.com/wp-content/uploads/2019/01/4-22.png 389w, https://www.osradar.com/wp-content/uploads/2019/01/4-22-300x121.png 300w" sizes="(max-width: 389px) 100vw, 389px" />
<figcaption>Add a option to the command</figcaption>
</figure>
</div>



<h3>Download a file with HTTPie</h3>



<p>Similar to CURL with HTTPie it is possible to download a file. For this you can use this command:</p>



<pre class="wp-block-preformatted">http page.com/file &gt; fileo</pre>



<p>Where <em>fileo</em> is the name will be downloaded.</p>



<p>Or you can also use the wget way.</p>



<pre class="wp-block-preformatted">http --download page.com/file</pre>



<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" width="1024" height="267" class="wp-image-9839" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/01/5-21-1024x267.png" alt="Download a file using HTTPie" srcset="https://www.osradar.com/wp-content/uploads/2019/01/5-21-1024x267.png 1024w, https://www.osradar.com/wp-content/uploads/2019/01/5-21-300x78.png 300w, https://www.osradar.com/wp-content/uploads/2019/01/5-21-768x200.png 768w, https://www.osradar.com/wp-content/uploads/2019/01/5-21-696x182.png 696w, https://www.osradar.com/wp-content/uploads/2019/01/5-21-1068x279.png 1068w, https://www.osradar.com/wp-content/uploads/2019/01/5-21.png 1365w" sizes="(max-width: 1024px) 100vw, 1024px" />
<figcaption>Download a file using HTTPie</figcaption>
</figure>
</div>



<p>So, this is how to download a file with HTTPie.</p>



<h3>Upload a file</h3>



<p>If you can download a file with HTTPie, obviously you can upload a file.</p>



<pre class="wp-block-preformatted">http example.com &lt; file.odt</pre>



<p>It is a very useful option to interact with servers, even homemade ones.</p>



<h3>Submitting form</h3>



<p>An interesting option is that you can interact with HTML forms. Imagine the possibilities. To do this, run this command.</p>



<pre class="wp-block-preformatted">http -f POST page.com input="value"</pre>



<h3>Basic authentication with HTTPie</h3>



<p>Next, as part of the interaction with servers and applications, you can perform basic authentication from the console with HTTPie.</p>



<pre class="wp-block-preformatted">http -a username:password page.com</pre>



<p>So, that&#8217;s all.</p>



<h2>Conclusion</h2>



<p>It&#8217;s good that sysadmin have CLI tools that facilitate some HTTP interaction processes. Therefore, HTTPie is presented as a great alternative to CURL and that&#8217;s why we win the users.</p>



<p>Please share this post with others.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/using-httpie-on-linux/">Using HTTPie on Linux</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/using-httpie-on-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to use CURL command on Linux?</title>
		<link>https://www.osradar.com/how-to-use-curl-command-linux/</link>
					<comments>https://www.osradar.com/how-to-use-curl-command-linux/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Wed, 26 Dec 2018 19:00:20 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[unix]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=8710</guid>

					<description><![CDATA[<p>On our site, there are many tutorials that have helped you learn about Linux, but in them, there is a very particular command called CURL. For example, in the post where I taught you how to install Rust, I used it, but I didn&#8217;t explain what it is. Therefore, in this post, I will teach [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-use-curl-command-linux/">How to use CURL command on Linux?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>On our site, there are many tutorials that have helped you learn about Linux, but in them, there is a very particular command called CURL. For example, in the post where I taught you <a href="https://www.osradar.com/install-rust-programming-language-linux/">how to install Rust</a>, I used it, but I didn&#8217;t explain what it is. Therefore, in this post, I will teach you how to use the CURL command on Linux.</p>
<p><a href="https://curl.haxx.se/" rel="noopener">CURL</a> is a command line tool and library for transferring data with URLs. Many download scripts or file transfers use CURL as a means to achieve this. In addition, CURL supports FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP and many other protocols quite popular on networks.</p>
<p>On the other hand, the use of CURL is not limited exclusively to computers but to other devices that use UNIX such as cell phones, cars and is the transfer backend of many of the most popular applications in the world.</p>
<h1>Using CURL command on Linux</h1>
<p>The idea of this post is to show the use of CURL, not to do it in a theoretical way. The main idea is to do it through examples that demonstrate its use.</p>
<p>So, let&#8217;s start.</p>
<h2>1. Install CURL</h2>
<p>Obviously, the first step is to install CURL. It is really simple as it is available in the official repositories of most Linux distributions. So, its installation is limited to a single command.</p>
<p>For Debian, Ubuntu, <a href="https://www.osradar.com/speed-up-cinnamon/">Linux Mint</a> and derivates</p>
<pre class="">:~$ sudo apt install curl</pre>
<p><figure id="attachment_8730" aria-describedby="caption-attachment-8730" style="width: 741px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8730" src="https://www.osradar.com/wp-content/uploads/2018/12/1-16.png" alt="1.- Install CURL" width="741" height="268" srcset="https://www.osradar.com/wp-content/uploads/2018/12/1-16.png 741w, https://www.osradar.com/wp-content/uploads/2018/12/1-16-300x109.png 300w" sizes="(max-width: 741px) 100vw, 741px" /><figcaption id="caption-attachment-8730" class="wp-caption-text">1.- Install CURL</figcaption></figure></p>
<p>If you use Fedora:</p>
<pre class="">:~$ sudo dnf install curl</pre>
<p>For CentOS and RHEL:</p>
<pre class="">:~$ yum install curl</pre>
<h2>2. Check the CURL version</h2>
<p>The second thing you should do is, check the CURL version. Important to know what news you have available. While it is not essential to have CURL updated to its latest version, it is also not crazy to do so.</p>
<pre class="">:~$ curl --version</pre>
<p><figure id="attachment_8731" aria-describedby="caption-attachment-8731" style="width: 1365px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8731" src="https://www.osradar.com/wp-content/uploads/2018/12/2-16.png" alt="2.- Checking the CURL version" width="1365" height="177" srcset="https://www.osradar.com/wp-content/uploads/2018/12/2-16.png 1365w, https://www.osradar.com/wp-content/uploads/2018/12/2-16-300x39.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/2-16-768x100.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/2-16-1024x133.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/2-16-1068x138.png 1068w" sizes="(max-width: 1365px) 100vw, 1365px" /><figcaption id="caption-attachment-8731" class="wp-caption-text">2.- Checking the CURL version</figcaption></figure></p>
<h2>3. Display the content of an HTML</h2>
<p>A simple way to display the source code of an HTML site from the terminal is with CURL.</p>
<pre class="">:~$ curl http://website.com/page.html</pre>
<p>Of course, it is necessary that you place the complete website of your preference.</p>
<p><figure id="attachment_8732" aria-describedby="caption-attachment-8732" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8732" src="https://www.osradar.com/wp-content/uploads/2018/12/3-16.png" alt="3.- Showing a HTML page on the terminal thanks to CURL command" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/12/3-16.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/3-16-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/3-16-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/3-16-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/3-16-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/3-16-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-8732" class="wp-caption-text">3.- Showing an HTML page on the terminal thanks to CURL command</figcaption></figure></p>
<h2>4. Download a file with CURL</h2>
<p>This is one of the most common uses we give to CURL. Downloading a file is a really simple task.</p>
<pre class="">:~$ curl -O https://pixabay.com/en/photos/download/ocean-3605547_1280.jpg</pre>
<p><figure id="attachment_8733" aria-describedby="caption-attachment-8733" style="width: 795px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8733" src="https://www.osradar.com/wp-content/uploads/2018/12/4-16.png" alt="4.- Downloading a file" width="795" height="149" srcset="https://www.osradar.com/wp-content/uploads/2018/12/4-16.png 795w, https://www.osradar.com/wp-content/uploads/2018/12/4-16-300x56.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/4-16-768x144.png 768w" sizes="(max-width: 795px) 100vw, 795px" /><figcaption id="caption-attachment-8733" class="wp-caption-text">4.- Downloading a file</figcaption></figure></p>
<p>You can use the <code>-o</code> option to specify the name of the downloaded file.</p>
<pre class="">:~$ curl -o image.jpg https://pixabay.com/en/photos/download/ocean-3605547_1280.jpg</pre>
<p><figure id="attachment_8734" aria-describedby="caption-attachment-8734" style="width: 889px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8734" src="https://www.osradar.com/wp-content/uploads/2018/12/5-15.png" alt="5.- Downloading a file using the -o option" width="889" height="148" srcset="https://www.osradar.com/wp-content/uploads/2018/12/5-15.png 889w, https://www.osradar.com/wp-content/uploads/2018/12/5-15-300x50.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/5-15-768x128.png 768w" sizes="(max-width: 889px) 100vw, 889px" /><figcaption id="caption-attachment-8734" class="wp-caption-text">5.- Downloading a file using the -o option</figcaption></figure></p>
<p>I remind you again that, I&#8217;m using test URLs, you have to enter yours.</p>
<h2>5. Use a proxy</h2>
<p>With CURL it is possible to make connections through a <a href="https://www.osradar.com/squid-proxy-install-and-configure-it/">proxy</a>. The proxy may or may not require authentication.</p>
<pre class="">:~$ curl -x your-proxy:8080 -U user_password -O http://domain.com/file</pre>
<p><figure id="attachment_8736" aria-describedby="caption-attachment-8736" style="width: 1122px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8736" src="https://www.osradar.com/wp-content/uploads/2018/12/6-66.png" alt="6.- Using a proxy server" width="1122" height="183" srcset="https://www.osradar.com/wp-content/uploads/2018/12/6-66.png 1122w, https://www.osradar.com/wp-content/uploads/2018/12/6-66-300x49.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/6-66-768x125.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/6-66-1024x167.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/6-66-1068x174.png 1068w" sizes="(max-width: 1122px) 100vw, 1122px" /><figcaption id="caption-attachment-8736" class="wp-caption-text">6.- Using a proxy server</figcaption></figure></p>
<p>In case the proxy server does not need authentication, you can omit the option -U.</p>
<h2>6. Get HTTP header information from a website</h2>
<p>There are occasions when it is necessary to know the information stored in the HTTP headers of some website. It is really easy to do it with CURL.</p>
<pre class="">:~$ curl -I http://website.com</pre>
<p><figure id="attachment_8737" aria-describedby="caption-attachment-8737" style="width: 767px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8737" src="https://www.osradar.com/wp-content/uploads/2018/12/7-77.png" alt="7.- Showing HTTP website header" width="767" height="206" srcset="https://www.osradar.com/wp-content/uploads/2018/12/7-77.png 767w, https://www.osradar.com/wp-content/uploads/2018/12/7-77-300x81.png 300w" sizes="(max-width: 767px) 100vw, 767px" /><figcaption id="caption-attachment-8737" class="wp-caption-text">7.- Showing HTTP website header</figcaption></figure></p>
<h2>7. Limit download rate</h2>
<p>If you are connected using mobile data or simply want to limit the CURL download rate, you can do it easily.</p>
<pre class="">:~$ curl --limit-rate 100K -O http://domain.com/file.file</pre>
<p><figure id="attachment_8738" aria-describedby="caption-attachment-8738" style="width: 749px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8738" src="https://www.osradar.com/wp-content/uploads/2018/12/8-88.png" alt="8.- Using a proxy server" width="749" height="155" srcset="https://www.osradar.com/wp-content/uploads/2018/12/8-88.png 749w, https://www.osradar.com/wp-content/uploads/2018/12/8-88-300x62.png 300w" sizes="(max-width: 749px) 100vw, 749px" /><figcaption id="caption-attachment-8738" class="wp-caption-text">8.- Using a proxy server</figcaption></figure></p>
<h2>8. Download file from an FTP server</h2>
<p>As I said at the beginning of this post, CURL supports many protocols, not only HTTP but also <a href="https://www.osradar.com/configure-vsftpd-with-ssl-tls-on-centos-7/">FTP</a>. Now I will show you how to do it.</p>
<pre class="">:~$ curl -u username:password -O ftp://ftpserver/file.zip</pre>
<p><figure id="attachment_8739" aria-describedby="caption-attachment-8739" style="width: 1124px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8739" src="https://www.osradar.com/wp-content/uploads/2018/12/9-99.png" alt="9.- Downloading a file from a FTP server" width="1124" height="155" srcset="https://www.osradar.com/wp-content/uploads/2018/12/9-99.png 1124w, https://www.osradar.com/wp-content/uploads/2018/12/9-99-300x41.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/9-99-768x106.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/9-99-1024x141.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/9-99-1068x147.png 1068w" sizes="(max-width: 1124px) 100vw, 1124px" /><figcaption id="caption-attachment-8739" class="wp-caption-text">9.- Downloading a file from an FTP server</figcaption></figure></p>
<p>In case you do not need authentication, omit the option -u.</p>
<h2>9. Upload Files to an FTP server</h2>
<p>You can also upload files to an FTP server. The syntax is similar only this time, you should add the -T option.</p>
<pre class="">:~$ curl -u username:password -T myfilepath.jpg ftp://ftpserver/file.zip</pre>
<p><em>Note: I&#8217;m using false addresses and that&#8217;s why CURL can&#8217;t find them. But don&#8217;t worry that the commands are correct.</em></p>
<h2>10. Check the CURL help</h2>
<p>Of course, the use of the CURL command is very extensive and I only demonstrated some of its uses. For more information about the CURL command, it is convenient to consult its help from the terminal.</p>
<pre class="">:~$ curl --help</pre>
<p><figure id="attachment_8740" aria-describedby="caption-attachment-8740" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8740" src="https://www.osradar.com/wp-content/uploads/2018/12/10-1111.png" alt="10.- CURL help" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/12/10-1111.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/10-1111-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/10-1111-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/10-1111-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/10-1111-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/10-1111-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-8740" class="wp-caption-text">10.- CURL help</figcaption></figure></p>
<p>And that&#8217;s it.</p>
<h1>Conclusion</h1>
<p>I hope this article has made clear to you the potential of CURL. There is so much potential that there is still so much to show, but I think the objective has been achieved.</p>
<p>CURL is widely used in script automation of content downloads and is not only used in computer equipment but in many others.</p>
<p>So, if you liked the article share it through your social networks.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-use-curl-command-linux/">How to use CURL command on Linux?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-use-curl-command-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Change User Agent on cURL</title>
		<link>https://www.osradar.com/change-user-agent-on-curl/</link>
					<comments>https://www.osradar.com/change-user-agent-on-curl/#respond</comments>
		
		<dc:creator><![CDATA[Mel]]></dc:creator>
		<pubDate>Sat, 19 May 2018 15:21:04 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[curl user agent]]></category>
		<category><![CDATA[user agent]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=3165</guid>

					<description><![CDATA[<p>cURL is a really useful tool for Linux users. This tool can easily download all the files from the internet over lots of supported protocols – FTP, HTTPS, IMAP, POP3, RTSP, SMB, SMTP, SCP, DICT etc. and lot more. That’s why it’s my favorite tool to download files from the internet instead of “wget”. When [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/change-user-agent-on-curl/">Change User Agent on cURL</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>cURL is a really useful tool for Linux users. This tool can easily download all the files from the internet over lots of supported protocols – FTP, HTTPS, IMAP, POP3, RTSP, SMB, SMTP, SCP, DICT etc. and lot more. That’s why it’s my favorite tool to download files from the internet instead of “wget”. When you use cURL, the server sees you as a browser requesting file access. Now, let&#8217;s take a look how to change the user agent of cURL.</p>
<p>When connecting to the server, the program sends a data like this – “<em>Mozilla/5.0 (X11; Ubuntu; Linux x86_64; </em>rv<em>:59.0) Gecko/20100101 Firefox/59.0</em>”. The server identifies that you’re using Firefox (although you’re not). You can set out the option of your favorite browser as user-agent of the cURL tool.</p>
<h3>Changing the user-agent</h3>
<p>In cURL, the syntax for changing the user-agent follows this structure –</p>
<pre>curl -A "user-agent-name-here" url
curl --user-agent "user-agent-name-here" url
curl -H "User-Agent: user-Agent-Name-Here"</pre>
<p>The user agent also follows this structure –</p>
<pre>Mozilla/[version] ([system and browser information]) [platform] ([platform details]) [extensions]</pre>
<p>In this command line example, I’ll be using Firefox as the user-agent of cURL for connecting with <a href="http://www.osradar.com/">OSRadar</a>.</p>
<pre>$ curl -A "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0" https://www.osradar.com/
$ curl -I -A "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0" https://www.osradar.com/</pre>
<p><img loading="lazy" class="size-full wp-image-3168 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/05/curl-firefox-user-agent.png" alt="" width="1185" height="506" srcset="https://www.osradar.com/wp-content/uploads/2018/05/curl-firefox-user-agent.png 1185w, https://www.osradar.com/wp-content/uploads/2018/05/curl-firefox-user-agent-300x128.png 300w, https://www.osradar.com/wp-content/uploads/2018/05/curl-firefox-user-agent-768x328.png 768w, https://www.osradar.com/wp-content/uploads/2018/05/curl-firefox-user-agent-1024x437.png 1024w, https://www.osradar.com/wp-content/uploads/2018/05/curl-firefox-user-agent-696x297.png 696w, https://www.osradar.com/wp-content/uploads/2018/05/curl-firefox-user-agent-1068x456.png 1068w, https://www.osradar.com/wp-content/uploads/2018/05/curl-firefox-user-agent-984x420.png 984w" sizes="(max-width: 1185px) 100vw, 1185px" /></p>
<p>If you want to use your user-agent as Safari, use this command line –</p>
<pre>curl -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (K HTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" https://www.osradar.com/</pre>
<p><img loading="lazy" class="size-full wp-image-3169 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/05/curl-user-agent-safari.png" alt="" width="1181" height="460" srcset="https://www.osradar.com/wp-content/uploads/2018/05/curl-user-agent-safari.png 1181w, https://www.osradar.com/wp-content/uploads/2018/05/curl-user-agent-safari-300x117.png 300w, https://www.osradar.com/wp-content/uploads/2018/05/curl-user-agent-safari-768x299.png 768w, https://www.osradar.com/wp-content/uploads/2018/05/curl-user-agent-safari-1024x399.png 1024w, https://www.osradar.com/wp-content/uploads/2018/05/curl-user-agent-safari-696x271.png 696w, https://www.osradar.com/wp-content/uploads/2018/05/curl-user-agent-safari-1068x416.png 1068w, https://www.osradar.com/wp-content/uploads/2018/05/curl-user-agent-safari-1078x420.png 1078w" sizes="(max-width: 1181px) 100vw, 1181px" /></p>
<p>Enjoy cURL!</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/change-user-agent-on-curl/">Change User Agent on cURL</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/change-user-agent-on-curl/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
