Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
sudo ã³ãã³ãã® "-i" ãªãã·ã§ã³ã¨ "-E" ãªãã·ã§ã³ã«ã¤ãã¦ã¡ã¢ã ã»Man page of SUDO https://linuxjm.osdn.jp/html/sudo/man8/sudo.8.html â -i ãªãã·ã§ã³ã«ã¤ã㦠ããã¥ã¡ã³ãæ°ã ãã¹ã¯ã¼ãã»ãã¼ã¿ãã¼ã¹ã®å¤èº«å¯¾è±¡ã¦ã¼ã¶ã®é ç®ã§ãã°ã¤ã³ã»ã·ã§ã«ã¨ãã¦æå®ããã¦ããã·ã§ã«ãå®è¡ãããããªãã¡ã .profile ã .login ã¨ãã£ããã°ã¤ã³ç¨ã®ãªã½ã¼ã¹ã»ãã¡ã¤ã«ãã ã·ã§ã«ã«ãã£ã¦èªã¿è¾¼ã¾ãããã¨ã«ãªãã ã¨ã®ãã¨ããããæå®ãã㨠ï¼HOME/.bash_profile ãªããèªã¿è¾¼ã¾ããã¨ãããã¨ã®ããã§ãã åä½ç¢ºèªãã # cat /tmp/env/test.sh #!/bin/sh echo $ETC_PROFILE echo $BASH_PROFILE # cat /etc/profil
ããã¾ã§ã®åç OpenSSLã使ã£ã¦ãªã¬ãªã¬è¨¼ææ¸ãä½ã£ãçµé¨ã¯ä½åº¦ãããã®ã§ãããå 人ããããã§ç´¹ä»ããã¦ããæé ã®ã¨ããã«æä½ããã ãã§ãåãµãã³ãã³ãã®æ©è½ãè¨å®ããªãã·ã§ã³ã®æå³ãªã©ä½ãç解ãã¦ãã¾ããã§ããã ä»åãå¤æ°ã®ãã©ã¤ãã¼ãCAã¨ã¯ã©ã¤ã¢ã³ã証ææ¸ãã¹ã¯ãªããã§èªåä½æãããã¨ã«ãªã£ãã®ã§ããããæ©ä¼ã«opensslã³ãã³ãã®åå¼·ãå§ãã¾ããã ãªãopensslã³ãã³ããé£ããã®ã å人çã«é£ããã¨æãç¹ãã¾ã¨ããããããªã«ããã¾ãã⦠ã³ãã³ãï¼ãµãã³ãã³ãï¼ã®æ°ãå¤ãããããæ©è½ãéè¤ãã¦ãã OpenSSLã³ãã³ãï¼1.0.2ï¼: https://www.openssl.org/docs/man1.0.2/man1/ åãç®çã®ããã®æ¹æ³ããããããã ä¾ãã°è¨¼ææ¸çºè¡ã [ç§å¯éµãä½æ] â [ç½²åè¦æ±ãä½æ] â [ç½²åãã¦è¨¼ææ¸ãçºè¡] ã¨3æé ã§è¡ãæ¹
西澤ã§ããAWS Summit 2018 San Franciscoã§çºè¡¨ãããACMã®æ°æ©è½ã§ããPrivate Certificate Authorityã使ã£ã¦ããã©ã¤ãã¼ããªèªè¨¼å±ãä½ã£ã¦ã¿ã¾ããã調ã¹ãªããã¨ããããåãã¨ããã¾ã§ã¯ãã©ãçãã¾ããããä¸é©åãªç®æãªã©ããã°ãææããã ãã¾ãã¨å©ããã¾ãã Introducing AWS Certificate Manager Private Certificate Authority What Is ACM PCA? - AWS Certificate Manager Private Certificate Authority ACMãã©ã¤ãã¼ãCAãå©ç¨ããä¸ã§ã®æ³¨æ ä»åãªãªã¼ã¹ãããACMã®ãã©ã¤ãã¼ãCAãå©ç¨ããããã¼ã¸ããªãã©ã¤ãã¼ãèªè¨¼å±ãç¨æãããã¨ã«ããããã©ã¤ãã¼ããªè¨¼ææ¸ãä»»æã®ååãã©ã¤ããµã¤ã¯ã«ã§èªç±ã«
opensslã使ç¨ãã¦Chromeã§ä½¿ããèªå·±ç½²å証ææ¸ï¼ãªã¬ãªã¬è¨¼ææ¸ï¼ãä½æããæ¹æ³ã解説ãã¾ãã ã¾ããç°¡åã«çæã§ãããã¼ã«ãç¨æãã¾ããããããã°ãæ´»ç¨ä¸ããï¼dockerãå¿ è¦ã§ãï¼ çºç«¯ ãã¼ã«ã«ç°å¢ã§httpsãå®ç¾ããããã«ããªã¬ãªã¬(èªå·±ç½²å)SSL証ææ¸ãä½æããã®ã§ããchromeã§ã¯NET::ERR_CERT_COMMON_NAME_INVALIDã¨ãªã£ã¦ãã¾ãã¾ããã åå ã¯ãChromeã®ä»æ§å¤æ´ã«ããããã¡ã¤ã³åã®ãã§ãã¯ãCommon Name(é称CN)ã§ã¯ãªãSubject Alternative Names(é称SAN)ãåèã«ããæ§ã«ãªã£ãããã ããã§ãã ããã§ã¯Subject Alternative Namesãå«ãã èªå·±ç½²åãµã¼ã証ææ¸ã®ä½ãæ¹ã解説ãã¾ãã (追è¨) èªå·±ç½²å証ææ¸ãä½æãããã¼ã«ãä½ãã¾ããã self-sign-cer
TL;DR xargsã¯GNUç(Linuxãªã©)ã¨BSDç(Macãªã©)ãåå¨ãæåã«éããããã BSDçã®xargsã§ã¯-Iãªãã·ã§ã³(æååç½®æ)ãå©ç¨ããå ´åã«ãã¤ãæ°ã®å¶éãããã -Iãªãã·ã§ã³ã¯ç½®æå¾ã®æååã255ãã¤ã以ä¸ã«ãªã£ãå ´åã«ç½®æãããªãã -Jãªãã·ã§ã³ã代ããã«å©ç¨ãããã¨ã§ãã¤ãæ°å¶éã®åé¡ã¯è§£æ±ºãããã-Iãªãã·ã§ã³ã¨ã¯ç°ãªãæåãããã®ã§æ³¨æãå¿ è¦ã Macã«GNUçã®xargsãå ¥ãã¦ãã¾ãã®ãæã å®è¡ç°å¢ æ¬è¨äºã¯ã以ä¸ã®ç°å¢ã«ã¦å®è¡ãã¦ãã¾ãã macOS Catalina 10.15.7 (Intel) GNU bash, version 3.2.57 ããã£ãç¹ ã¹ã¯ãªãããæ¸ãã¾ã§ããªããã©èªååãããå¦çãsed/awk/xargsãªã©ã®ã³ãã³ããé§ä½¿ããã¯ã³ã©ã¤ãã¼ã§æ¸ã¾ããã¨ã¯å¤ãã¨æãã¾ãã ã¾ããã¢ãããã¯ãªå¦çã§ã¯å人ã®ãã¼
ã¡ãã£ã¨ããæ¥æ¬èªåºåãã¨ã¹ã±ã¼ãã³ã¼ãã«ãªã£ã¦ã¤ã©ãã¨ãããã¨ãããã ãã®ãã³ã«ãã¼ã«ããããããå¤æã¹ã¯ãªãããæ¸ãã¦ãã®ãã§ããã å®ã¯ã³ãã³ãã® echo -e ã printf ã§æéãªãã§ãã³ã¼ãã§ãããã¨ãæè¿ç¥ã£ãã $ /usr/bin/printf '\xef\xbc\x91\xef\xbc\x96\xe9\x80\xb2\xe6\x95\xb0 \357\274\230\351\200\262\346\225\260 \u30e6\u30cb\u30b3\u30fc\u30c9 \n' ï¼ï¼é²æ° ï¼é²æ° ã¦ãã³ã¼ã $ printf '\xef\xbc\x91\xef\xbc\x96\xe9\x80\xb2\xe6\x95\xb0 \357\274\230\351\200\262\346\225\260 \u30e6\u30cb\u30b3\u30fc\u30c9
nslookupã ããå©ãã¨ãå¼ãç¶ãã³ãã³ããå©ããã¨ãåºæ¥ãããã³ããã表示ããã¾ãã ããã§set type=nsã¨ããã¨ããããã¡ã¤ã³ã«ã¤ãã¦ãè¨å®ããã¦ãããã¼ã ãµã¼ãã表示ããã¢ã¼ãã«ãªãã¾ãã®ã§ã調ã¹ãããã¡ã¤ã³ãå¼ãç¶ãå ¥åããã¨ããã®ãã¡ã¤ã³ã®ãã¼ã ãµã¼ãæ å ±ãå¼ãåºããã¨ãåºæ¥ã¾ãã ãã ããã®æ å ±æºã¯ããªãã®PCã«è¨å®ããã¦ããåç §ç¨ãã¼ã ãµã¼ããä¿æãã¦ããæ å ±ï¼ãã£ãã·ã¥ããã¦ããã°ãã®ãã£ãã·ã¥ã§ããNon-authoritative answerã¨è¡¨ç¤ºãããããã£ãã·ã¥ããªããã°ã«ã¼ããµã¼ãããåèµ·çã«æ å ±ãå¼ãï¼ã§ããããã¡ã¤ã³ã®è¨å®ããã¦ãããã¼ã ãµã¼ãããç´æ¥æ å ±ãå¼ããããã°ãããã«server=ã³ãã³ãã§æ å ±å ¥æå ãè¨å®ãããã¨ãåºæ¥ã¾ããããããã§ããã«ãã¡ã¤ã³ãå¼ãã°OKã§ãã ç§ã®Windows PCã§goo.ne.jpãå¼ãã¦ã¿ãä¾ã§ãã C
æ¹è¡ã³ã¼ãå¤æã¯trãPerlã使ãããæ¹ãããç¥ããã¦ãããã©ãAWKã ã¨ãRS (input record separator) ã ORS (output record separator) ã使ãã¨æè»ã«å¤æã§ããããã ã awk -v ORS='\r\n' '{print}' < lf.txt > crlf.txt awk -v RS='\r\n' '{print}' < crlf.txt > lf.txt awk -v RS='\r' '{print}' < cr.txt > lf.txt awk -v RS='\r' -v ORS='\r\n' '{print}' < cr.txt > crlf.txt
ã¯ããã« æè¿ãbash, awk, jqã«ãä¸è©±ã«ãªã£ã¦ããã¾ãã ç¹ã«awkã¯ä½¿ãå§ããã°ãããªã®ã§ãawkã使ã£ã¦ã¯ã³ã©ã¤ã³ã§excelã®vlookupçãªãã¨ãããããã¨ãã«ã©ãããã°ããã®ãããããªãã¦ãexcelã§é å¼µã£ã¦ãããã¦ã¾ããã ã§ãã¨ã³ã¸ãã¢ãªãã°ãexcelãªãã¦ä½¿ããªãã¦ãã³ãã³ãã©ã¤ã³ã§ã±ã±ã£ã¨æä½ã§ããã»ããæ ¼å¥½ãããããªã?ã¨æã£ãã®ã§ææ¦ãã¦ã¿ã¾ãã ç®æ¨ 以ä¸ã®2ã¤ã®è¡¨ãæ³å®ããã ã¦ã¼ã¶ä¸è¦§ãæ ¼ç´ãã表(users.csv) id name -- ---- 1 ä¸é 2 äºé 3 ä¸é 4 åé ä½ãããã®æ¡ä»¶ãã¿ãããIDã®è¡¨(condition.csv) id -- 2 4 ãã®ï¼ã¤ã®è¡¨ãã以ä¸ãå¾ããã ã´ã¼ã« id name condition -- ---- ---- 1 ä¸é F 2 äºé T 3 ä¸é F 4 åé T conditio
sedãawkã§ãæå®ãããç¯å²ã®è¡ãé¤å¤(ã¨ããããåé¤)ãããã¨ãããã¨ããã£ãã®ã§ããã®åå¿ãd 以ä¸ã®ããã«è¨è¿°ãã¦å®è¡ãã¦ãããã¨ã§ã対象ã¨ãªãç¯å²ã®è¡ãé¤å¤ãã¦åºåã§ããã sed '/start/,/end/d' PATH awk '/start/,/end/{next}{print}' PATH [root@BS-PUB-CENT7-01 ~]# cat test.txt 111 222 333 444 <span style="color: #ff0000;">start eee ddd sss end</span> 555 666 777 888 999 [root@BS-PUB-CENT7-01 ~]# cat test.txt | sed '/start/,/end/d' 111 222 333 444 555 666 777 888 999 [root@BS-PU
-Iãªãã·ã§ã³ã¾ãã¯--dump-header(-D) ãªãã·ã§ã³ã使ç¨ããï¼--dumper-headerãªãã·ã§ã³ã¯åºåå ãã¡ã¤ã«ããã©ã¡ã¼ã¿ã§æå®ããã®ã§ï¼- ãæå®ãããã¨ã§æ¨æºåºåã«è¡¨ç¤ºãããï¼ $ curl --dump-header - http://www.w3c.org/ HTTP/1.1 301 Moved Permanently Cache-Control: no-cache Content-length: 0 Location: http://www.w3.org/ Connection: close Register as a new user and use Qiita more conveniently You get articles that match your needsYou can efficiently read back useful info
Twitterããã±ã¼ãã¨çºãã¦ããã¨ãããxargsã§å¼ã³åºããã³ãã³ãã«ãã¼å ¥åããããã¨ããå 容ããã£ãã®ã§ãã©ããã£ããã§ããã®ã調ã¹ã¦ã¿ãã é常ã対象ã®ããã»ã¹ã§æ¨æºå ¥åãéãã¦ãªãã¨ã ãããã®(ã¨ããããæ®éã®)ã³ãã³ãã¯å¦çãå¾ ããã«çµäºãã¦ãã¾ãããªã®ã§ããªãã¨ããã¦ã¿ã¼ããã«ãæ¨æºå ¥åã¨ãã¦æ¸¡ãã¦ããã°ããã¨ãããã¨ã«ãªãã 1. /dev/ttyãèªã¿è¾¼ã¾ãã 以ä¸ã®ããã«ã/dev/ttyãxargsã§å¼ã³åºããã³ãã³ãå é¨ã§èªã¿è¾¼ã¾ããäºã§ãã¿ã¼ããã«ã®å ¥åã渡ããã¨ãã§ããã command... | xargs -I@ sh -c '</dev/tty command... @' ä¾ãã°ã以ä¸ã®ããã«ãããã¨ã§xargsã§åãä»ãããã¡ã¤ã«ã«å¯¾ãã¦å¯¾è©±å¼ã«rmããããã¨ãã§ããã ls -1 | xargs -I @ sh -c '</dev/tty rm -
Linuxã«ã¯"yes"ã¨ããã³ãã³ãããããæåä½ã ããã¯ãã¨æã£ãã³ãã³ãã ããæ¡å¤ä½¿ãéã®å¤ãã³ãã³ãã ã£ãã®ã§ãã¾ã¨ãã¦ã¿ãã åºæ¬ç·¨ ã"y"ãä¸æåå ¥åãã¦æ¹è¡ãããç¡éã«ç¹°ãè¿ãããåºæ¬åä½ã¨ãªãã # yes y y y y y ï½ä»¥ä¸ç¥ï½ y y ^CãããâCtrl + Cã§æ¢ãã # yesã®å¾ã«æååãæ¸ãã°ããã®æååãç¹°ãè¿ãããã # yes no no no no no no ï½ä»¥ä¸ç¥ï½ no no ^CãããâCtrl + Cã§æ¢ãã # ãã®ã³ãã³ãã®æå³ããã使ãæ¹ã¯ãrmã³ãã³ãçã§yes/noãæ±ããããéã«yesããã¤ãã§æ¸¡ãã¦ããã¨ããã¡ãã¡"y"ãæ¼ãã¦ã¨ã³ã¿ã¼ããæéãçããã¨ãã使ãæ¹ãã§ãããã¨ããããrmã§ã¯-fãªãã·ã§ã³ããããããã»ã©å¤ãã£ã人ã§ã¯ç¡ãéã常ç¨ã¯ããªãã ãããã-fãªãã·ã§ã³ã®ç¡ãã³ãã³ãã§ã¯ä½¿ãéã¯ãããããããª
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}