文章加密

;

2019年1月10日 星期四

sftp command line

http://www.mold.net.tw/classroom/ftplearn/dosftp.htm

上連結式在 Windows 的 DOS命令提示號下使用 FTP(File Transfer Protocol),只要把其中的ftp改sftp(Secure File Transfer Protocol)就可以了,其中兩者的port ftp是21,sftp是22所以打錯就連不到囉~會顯示「ftp: connect :連線已等候逾時」。


  1. cmd本地位置設置在要和remote互動的資料夾
  2. 再打上sftp 帳號@網址或ip位置
  3. 輸入密碼(密碼會是看不見的,打的時候沒出現不要緊張)
  4. 完成後就會顯示Connected to 帳號@網址或ip位置
  5. 然後就可以開始操作

(英文版解說)
  1. Using your institution's assigned username, enter the following command: sftp [username]@scp.oclc.org
  2. Enter your institution's assigned password
  3. Choose directory (see directory folders): Enter cd [directory name or path]
  4. To retrieve files, enter get*
  5. To delete files after retrieving them, enter rm*
  6. Enter quit

可以用sftp> get 檔案,但是不能用sftp> get 資料夾,因為you can't do a recursive get with sftp,you should use scp instead


SCP(Secure Copy):scp就是secure copy,是用来进行远程文件复制的,并且整个复制过程是加密的。数据传输使用ssh,并且和使用和ssh相同的认证方式,提供相同的安全保证。 
scp -r 帳號@網址或ip位置:遠端站台位置 欲下載到的本機位置




A core SFTP protocol does not support duplicating a remote file.
There's draft of the copy-file extension to the protocol, but that's supported by only few SFTP servers (ProFTPD/mod_sftp and Bitvise SFTP server for example) and few SFTP clients (WinSCPfor example).
It's definitely not supported by the most widespread OpenSSH SFTP server. Nor by OpenSSH SFTP client (sftp), i.e. there's no cp command or any other functionally equivalent.

Alternatives (which you seem to know and won't help you):
  • If you have SSH/terminal access into the server, use the shell cp command.
  • If your SFTP server supports the copy-file extension, use an SFTP client that supports it too.
  • Otherwise, your only option is to download the file to a local temporary location and upload its copy back to a different/target remote directory.
    Some SFTP clients can do this for you even transparently in one go (e.g. in WinSCP, see Duplicate via local temporary copy option on Duplicate dialog).



https://docs.oracle.com/cd/E26502_01/html/E29001/remotehowtoaccess-14.html  這個在研究一下

2019年1月8日 星期二

crud l

所謂的CRUD是指 新增(Create)、讀取(Read)、更新(Update)、刪除(Delete);有時會聽到「五個動作」,就只是再加上一個列表(List)的動作,RoR可以一次就包辦起來,在自己還沒搞清楚怎麼去寫這些從網頁來操作資料庫的動作前,就可以運作了。

所有前端跟API之間的動作,不外乎就是CRUD L。

reference:
https://ithelp.ithome.com.tw/articles/10009733

2019年1月3日 星期四

:hover 和 :before, :after 不能用在同元素

:hover 和 :before, :after 不能用在同元素

否则:hover在他们生出的content上也会有hover反应,这情形通常是不乐见的!