Copying-executable-files

home next >
approximate reading time: 1 minutes
created by pur on 2022/04/28 - last changed on 2022/04/28

Ever wanted to copy only the executable files from a directory - without any directories or subdirectories? I've got you covered

for i in $(ls -l | grep r-x | grep -v ^d | awk '{print $9}') ; do cp $i $TARGETDIR ; done

Explaination:

BTC: 1WLANzCKEuo8Zvssi84cyqTFePvQ8f8tW