I have 3 distinct folders: history, inbox, backup.I need to copy all the files from 'history' to 'inbox', only if they are not present in 'backup'.How to do this?
Advanced file filtering
shell;file copy
Just an example, is there any subfolder in history ?for x in history/*;do  [[ -f backup/$(basename $x) ]] || cp $x inboxdoneThis script would loop through all possible files in history folder, and extract the basename of it (e.g the basename of /bin/ls is ls), and check if the file exists in backup folder; if not, do the copy procedure.