mirror of
https://github.com/jbranchaud/til
synced 2026-03-05 15:38:44 +00:00
Compare commits
3 Commits
b3fea65d0e
...
114d446afb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
114d446afb | ||
|
|
594ec08636 | ||
|
|
295fe153ad |
@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
|
||||
|
||||
For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186).
|
||||
|
||||
_1451 TILs and counting..._
|
||||
_1452 TILs and counting..._
|
||||
|
||||
---
|
||||
|
||||
@@ -1387,6 +1387,7 @@ _1451 TILs and counting..._
|
||||
- [Display The Contents Of A Directory As A Tree](unix/display-the-contents-of-a-directory-as-a-tree.md)
|
||||
- [Do A Dry Run Of An rsync](unix/do-a-dry-run-of-an-rsync.md)
|
||||
- [Do Not Overwrite Existing Files](unix/do-not-overwrite-existing-files.md)
|
||||
- [Download A File With Curl](unix/download-a-file-with-curl.md)
|
||||
- [Enable Multi-Select Of Results With fzf](unix/enable-multi-select-of-results-with-fzf.md)
|
||||
- [Exclude A Command From The ZSH History File](unix/exclude-a-command-from-the-zsh-history-file.md)
|
||||
- [Exclude A Directory With Find](unix/exclude-a-directory-with-find.md)
|
||||
|
||||
@@ -5,6 +5,8 @@ an array-like object with all of the arguments to the function. Even if not
|
||||
all of the arguments are referenced in the function signature, they can
|
||||
still be accessed via the `arguments` object.
|
||||
|
||||
> For ES6+ compatibility, the `spread` operator used via [rest parameters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters) is preferred over the `arugments` object when accessing an abritrary number of function arguments.
|
||||
|
||||
```javascript
|
||||
function argTest(one) {
|
||||
console.log(one);
|
||||
|
||||
23
unix/download-a-file-with-curl.md
Normal file
23
unix/download-a-file-with-curl.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Download A File With Curl
|
||||
|
||||
Though I typically think of cURL as a way of hitting an API endpoint to check
|
||||
its headers or see what it returns, it can also be used as an alternative to
|
||||
`wget` to download a file.
|
||||
|
||||
With the `-O` option (short for `--remote-name`) we instruct cURL to save the
|
||||
contents of the remote file to a local file in the current directory _using the
|
||||
same name as the remote_.
|
||||
|
||||
Here is an example:
|
||||
|
||||
```bash
|
||||
$ curl -O https://www.apache.org/dist/db/derby/db-derby-10.17.1.0/db-derby-10.17.1.0-bin.zip.asc
|
||||
```
|
||||
|
||||
This creates a file in my current directory called
|
||||
`db-derby-10.17.1.0-bin.zip.asc`. Notice it only uses the last part of the path
|
||||
for the file name.
|
||||
|
||||
See `man curl` for more details.
|
||||
|
||||
[source](https://stackoverflow.com/questions/4572153/os-x-equivalent-of-linuxs-wget#comment84857090_4572158)
|
||||
Reference in New Issue
Block a user