Tar directory and exclude sub-directory

Mostly backup command in linux use tar command and if you want to backup directory and not need several sub-directory in root directory, you can use this

tar -cvzfp ./dirctoryname-backup.tar.gz --exclude=/folderA/foldera
ball Written by:

Teerapat Khunpech Live, Tech, Beers, Bike, Cafe Racer, Docker, Devops, Eco-System