Some important general purpose linux commands
How to get Filesize of a Folder or Directory
If you are looking for a linux command that shows the size of directory/folder then here it is
du -hs –DIRECTORYPATH–
where DIRECTORYPATH is the actual directory path. The possible output of this command will look like
This command is very much helpfull .
Copying file form one location to another location using RSYNC command:
rsync -avz –progress –SRCPATH— –DESTINATIONPATH–
Copying files with excluding a folder from being copied.
rsync -avz –progress –exclude ‘EXCLUDE DIRECTORY’ –SRCPATH— –DESTINATIONPATH–
Naming convention followed below
–SRCPATH— Source Path name
–DESTINATIONPATH– Destination Path name
EXCLUDE DIRECTORY – The directory that you want to get skipped from moving from source folder to destination.
Latest posts by Chandra Shekhar (see all)
- Best practices for micro service design - January 23, 2022
- Spring Boot - January 23, 2022
- Java - January 23, 2022