linux - How to make a list of files that don't exist from a list of files -
i have text file a.txt contains list of files:
photo/a.jpg photo/b.jpg photo/c.jpg etc i want list of files don't exist.
you can use:
xargs -i % bash -c '[[ ! -e $1 ]] && echo "$1"' _ % < a.txt > b.txt xargs run bash -c each line in a.txt. [[ ! -e $1 ]] check non-presence of each entry.
Comments
Post a Comment