Hi, I need some help with a tar command in linux. I need to backup the contents of a folder, but also need to exclude some directories. My directory structure. home >files >names >recordings >laps >>reside >>receipe >>koling >hello I need to tar the whole home directory, but exclude all the whole "recordings" directory, and also in the "lap" directory, I only need the files in it, but not the directories. Note that the directories in the laps folder are auto-generated and have different names, and the amounts of subdirectories are random aswell. What's the most efficient way of doing this with a tar command? Thank you
tar cvpzf backup.tgz --exclude=/lost+found --exclude=/recordings /home better you include "lap" directory