Document Title | Linux Misc. Commands Quick Reference Guide |
Type | Quick Reference |
Categories | Quick Reference |
Level | N/A |
Keywords | quick reference command line cli bash grep |
Author | Stewart Watkiss www.watkissonline.co.uk |
Date Created | 10th May 2006 |
Last Updated | 10th May 2006 |
Copyright | © 2006 www.penguintutor.com |
find -type f | xargs ls -l | cut -c 33- | sort -n
find -atime +32 -exec mv {} /export/home/audit/logs \;
rpm -q -a
rpm -U -v *.rpm
rpm -Fvh *.rpm
for i in `cat <dir to rpm files>`; do if rpm -qpl $i | grep libX >/dev/null; then echo $i; fi; done
rpm -qa | grep basesystem
for filename in * ; do echo > $filename; done
# To count number of none empty lines in a file
grep -v -e "^$" filename | wc -l
# To count number of source code lines (perl)
find . -name "*.p?" | xargs grep -v -e "^$" - | wc -l