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

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -