Tuesday, June 12, 2018

Find and delete files recursively in unix

recursively list files by extension
find ./ -type f | awk -F . '{print $NF}' | sort --unique
recursively list files by specific extension
find . -type f -iname "*.css" 

recursively delete them
find . -name "*.html" -type f -delete

No comments:

Post a Comment

Git get all remote branches

git branch -r \ | grep -v '\->' \ | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" \ | while read remote; do \ git branc...