Skip to content

Instantly share code, notes, and snippets.

@rollin96
Last active December 23, 2021 13:49
Show Gist options
  • Save rollin96/6e62b7568283b4fe0ef699afb6a35956 to your computer and use it in GitHub Desktop.
Save rollin96/6e62b7568283b4fe0ef699afb6a35956 to your computer and use it in GitHub Desktop.
# (scp_aa.sh)-i : private key 지정. -P : port 지정.
scp -i ~/.ssh/id_rsa_xxx -P 1026 root@host.name.fqdn:/from/path /to/path
# rsync
rsync -avh --delete -e ssh $SRC:$DIR/ $DIR >> $LOG_FILE
# (quark_setting.sh) mkdir -p = 이미 있으면 무시, 없으면 parent까지 생성.
mkdir -p /path/to/make
# jq = json 파싱. '.token' = token의 value만 출력. https://stedolan.github.io/jq/tutorial/
curl https://{{argocd_host}}/api/v1/session | jq '.token'
# (curl.bash) curl + cookie
$ curl -X POST -c cookies.txt -d "@-" http://xxx.xx/login
username=xxx&password=yyy
<ctrl+D>
$ curl -b cookies.txt -c cookies.txt http://xxx.yyy/abcd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment