Skip to content

Shell tools for Linux automation (CentOS and Raspbian primary)

Notifications You must be signed in to change notification settings

tonchikk/shell-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

shell-tools

Shell tools for Linux automation (CentOS and Raspbian primary)

Verifications and one-liners

Find Raspbian changed files

dpkg --verify -> dpkg --verify | awk '{print $3;}' | xargs dpkg -S - for configs

Compare directories

for same names

find /spool2d/files/archive/Video/ -maxdepth 1 -printf '%P\0' | xargs -0 -I % -n 1 bash -c '[ -f "%" -o -d "%" ] && echo -e "\n%" && ls -l "%" "/spool2d/files/archive/Video/%"'

and move to dups if any found

find /spool2d/files/archive/Video/ -maxdepth 1 -printf '%P\0' | xargs -0 -I % -n 1 bash -c '[ -f "%" -o -d "%" ] && mv -v "/spool2d/files/archive/Video/%" "/spool2d/files/archive/Video/dups/"'

Check first level did not containing somethis missed

find /spool2d/files/archive/Video/dups -maxdepth 1 -printf '%P\0' | xargs -0 -I % -n 1 bash -c '[ -f "%" -o -d "%" ] || echo "%"'

Find something new in subdirectories

find /spool2d/files/archive/Video/dups -printf '%P\0' | xargs -0 -I % -n 1 bash -c '[ -f "%" -o -d "%" ] || echo "%"'

About

Shell tools for Linux automation (CentOS and Raspbian primary)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages