Skip to content

Latest commit

 

History

History
55 lines (36 loc) · 837 Bytes

general.md

File metadata and controls

55 lines (36 loc) · 837 Bytes

General Commands

General commands for linux/shell/bash etc.

1. To move files (and folders) (can be used to rename files/folders):

mv <current_file_path> <new_file_path>

2. Delete a folder with files in it:

rm <folder_path> -rf

3. To list files and folders inside present working directory:

  • Basic use:

    ls
  • List hidden folders too:

    ls -a

4. To get the path of the present working directory:

pwd

5. Compress/Extract a folder using tar:

  • Compress:

    tar -zcvf <file_name>.gz <folder_name>
  • Extract:

    tar -xf <file_name>.gz

6. Send a file using SCP to a remote server:

scp <file_name> <user>@<server_ip>:/remote/folder/