Skip to content

Instantly share code, notes, and snippets.

@naveen521kk
Last active November 29, 2023 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naveen521kk/dd6e118fa8002b1efdec2398995191ae to your computer and use it in GitHub Desktop.
Save naveen521kk/dd6e118fa8002b1efdec2398995191ae to your computer and use it in GitHub Desktop.
I've collected a list of usefull commands which I can't usually remember top of my head

Compress a tar archive:

tar -czvf name-of-archive.tar.gz /path/to/directory-or-file

Extract a tar archive

tar -xf name-of-archive.tar.gz outdir/

Download a remote file/folder using scp

scp -i <path-to-ssh-key> -r <username>@<ip>:<path-to-directory-or-file> .

Login through ssh

ssh -i <path-to-ssh-key> <username>@<ip>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment