å¥ã®ãããã¯ã¼ã¯ç«¯æ«ãããã¡ã¤ã«ãã³ãã¼ããå¦çãèªååãããã ããããæã¯ãæ¬å½ã¯ã»ãã¥ãªãã£ãèæ ®ãã¦ å ¬ééµèªè¨¼ã使ã£ã¦scpã§ãã¡ã¤ã«ãã³ãã¼ããã®ãä¸çªè¯ãããæ¹ã ãã®è¾ºãã¯âã¨ãåèã«ããã¨è¯ãã®ããªï¼ ssh scp sftp ã®æ£ããèªåå®è¡æ¹æ³ ããã¯å ¬ééµèªè¨¼ã使ããªãæã®æçµæ段ã filecopy.expã¨ãããã¡ã¤ã«ãä½ãã ä¸èº«ã¯âãããªæãã #!/usr/bin/expect set timeout 5 spawn /usr/bin/scp -q [email protected]:file.txt /directory1/directory2/. expect "Password:" send "password\n" interactexpectã¯ããã®æååã表示ããããããªã®ã§ scpãå®è¡ããæã«ãã¹ã¯ã¼ããèãããã sendã§æå®ãã
{{#tags}}- {{label}}
{{/tags}}