1 |
for f in `find`; do mv -v "$f" "`echo $f | tr '[A-Z]' '[a-z]'`"; done |
All words only.
1 |
cat file | tr -sc '[:alpha:]' '[\n*]' | sort | uniq -c |sort -nr |
All words and digits
1 |
cat file | tr -sc '[:alnum:]' '[\n*]' | sort | uniq -c |sort -nr |
Sometimes piping to less on each is helpful depending on how big your file is.
This is nothing new but forgot how to do it, so just updating the blog.  🙂
Change perms for directories only.
1 |
find . -type d -exec chmod 755 {} \; |
Change perms for files only.
1 |
find . -type f -exec chmod 644 {} \; |
1 |
ps -ef | grep -v grep | grep "daemonname" | awk '{print $2}' | xargs kill -9 |
fdupes -rdN dir/
r – recursive
d – preserver first file, delete other dupes
N – run silently (no prompt)