출처: http://www.gnu.org/software/wget/
Mac에는 wget이 없음…
그래서 ubuntu 계열 쓰다가 mac쓰려면 curl을 써야하는데
습관이 없어지진않으니….
어쩔수 없다 라고 생각은 하지만 curl보다는 wget을 치고있는 손꾸락…
그래서 homebrew를 설치한김에 wget을 설치해봄
homebrew설치는 여기 참고
admin:~ admin$ brew install wget Updating Homebrew... ==> Installing dependencies for wget: gettext, libunistring, libidn2, openssl ==> Installing wget dependency: gettext ==> Downloading https://homebrew.bintray.com/bottles/gettext-0.19.8.1.high_sierr ######################################################################## 100.0% ==> Pouring gettext-0.19.8.1.high_sierra.bottle.tar.gz ==> Caveats This formula is keg-only, which means it was not symlinked into /usr/local, because macOS provides the BSD gettext library & some software gets confused if both are in the library path.
If you need to have this software first in your PATH run: echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile
For compilers to find this software you may need to set: LDFLAGS: -L/usr/local/opt/gettext/lib CPPFLAGS: -I/usr/local/opt/gettext/include
==> Summary 🍺 /usr/local/Cellar/gettext/0.19.8.1: 1,935 files, 16.9MB ==> Installing wget dependency: libunistring ==> Downloading https://homebrew.bintray.com/bottles/libunistring-0.9.9.high_sie ######################################################################## 100.0% ==> Pouring libunistring-0.9.9.high_sierra.bottle.tar.gz 🍺 /usr/local/Cellar/libunistring/0.9.9: 54 files, 4.4MB ==> Installing wget dependency: libidn2 ==> Downloading https://homebrew.bintray.com/bottles/libidn2-2.0.5.high_sierra.b ######################################################################## 100.0% ==> Pouring libidn2-2.0.5.high_sierra.bottle.tar.gz 🍺 /usr/local/Cellar/libidn2/2.0.5: 68 files, 669.1KB ==> Installing wget dependency: openssl ==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2o_1.high_sierr ######################################################################## 100.0% ==> Pouring openssl-1.0.2o_1.high_sierra.bottle.tar.gz ==> Caveats A CA file has been bootstrapped using certificates from the SystemRoots keychain. To add additional certificates (e.g. the certificates added in the System keychain), place .pem files in /usr/local/etc/openssl/certs
and run /usr/local/opt/openssl/bin/c_rehash
This formula is keg-only, which means it was not symlinked into /usr/local, because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.
If you need to have this software first in your PATH run: echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
For compilers to find this software you may need to set: LDFLAGS: -L/usr/local/opt/openssl/lib CPPFLAGS: -I/usr/local/opt/openssl/include
==> Summary 🍺 /usr/local/Cellar/openssl/1.0.2o_1: 1,791 files, 12.3MB ==> Installing wget ==> Downloading https://homebrew.bintray.com/bottles/wget-1.19.5.high_sierra.bot ######################################################################## 100.0% ==> Pouring wget-1.19.5.high_sierra.bottle.tar.gz 🍺 /usr/local/Cellar/wget/1.19.5: 50 files, 3.7MB admin:~ admin$ |
간단하게 설치가 끝남
테스트로 http://zelkun.tistory.com/robots.txt 파일을 다운받아 보았다
admin:~ admin$ wget http://zelkun.tistory.com/robots.txt --2018-05-21 16:25:51-- http://zelkun.tistory.com/robots.txt Resolving zelkun.tistory.com (zelkun.tistory.com)... 27.0.236.139 Connecting to zelkun.tistory.com (zelkun.tistory.com)|27.0.236.139|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 248 [text/plain] Saving to: ‘robots.txt’
robots.txt 100%[===================>] 248 --.-KB/s in 0s
2018-05-21 16:25:51 (19.7 MB/s) - ‘robots.txt’ saved [248/248]
admin:~ admin$ pwd /Users/admin admin:~ admin$ ls -alG | grep robots.txt -rw-r--r--@ 1 esu staff 248 5 17 17:15 robots.txt admin:~ admin$ |
cat으로 내용확인
admin:~ admin$ cat robots.txt User-agent: * Disallow: /owner Disallow: /manage Disallow: /admin Disallow: /oldadmin Disallow: /search Disallow: /m/search Disallow: /m/admin Disallow: /like Allow: /
User-agent: Mediapartners-Google Allow: /
User-agent: bingbot Crawl-delay: 30 admin:~ admin$ |
잘받아졌네요
[macOS High Sierra] Mysql 8.x dmg install 설치 (0) | 2018.06.16 |
---|---|
[macOS High Sierra] Mysql 8.x brew install 설치 (0) | 2018.06.16 |
[maxOS High Sierra] Python pip install (0) | 2018.05.29 |
[maxOS High Sierra] JENV (Manage your Java environment) install homebrew & JAVA_HOME (0) | 2018.05.23 |
[maxOS High Sierra]Homebrew 설치 (0) | 2018.05.20 |
댓글 영역