Skip to content
This repository was archived by the owner on Mar 19, 2022. It is now read-only.

Latest commit

 

History

History
20 lines (14 loc) · 1.29 KB

File metadata and controls

20 lines (14 loc) · 1.29 KB

Day 12

Notes

  • It appears that sftp (I used the cli, from OpenSSH) is pretty useful over scp because scp closes the session after each file transfer.

  • However, we cannot delete a dir which contains subdirs or is not empty because sftp doesnot provide rm -r option. A workaround this would be to first delete all file rm newdir/* and then delete the dir rmdir newdir.

  • Also, since we login as a normal user, we won't be able to make files or copy files to in /var/, /etc, etc. dirs. A workaround this is to make/copy file where it is possible and then login with ssh and use sudo.

  • Another tip is that when working in ssh session, (say in vim), we have only one terminal (else we would have to ssh from another terminal too). So, to escape (temporarily) to shell from vim, we can either do -

    • :sh and then exit
    • Ctrl+z and then fg, to suspend vim and bring it to foreground respectively.
  • sftp from nautilus also works great.

Readings