ll -rth /var/log/
Tag Archives: Bash
check the latest changes
ls -lrth
search for content
grep -rn ‘LDAP says no user’ *
start vlc with camera
vlc v4l2:///dev/video0
analyze mysql logs
pt-query-digest –limit 100 ~/Desktop/mysql-slow.log.2 ~/Desktop/mysql-slow.log.1 ~/Desktop/mysql-slow.log >> ~/Desktop/slow-log-statistics-3d.txt
You have to find on the internet, download and install the program first
you can directly mail like:
pt-query-digest –limit 50 /var/log/mysql/mysql-slow.log | mailx -s “performance charts from the X Server” “programer@test.com”
delete in line nr
sed -i ’10d’
search the big files
srsouthp02:/# ls -lahS $(find / -type f -size +10000k)
besser
Folders:
du -a /var | sort -n -r | head -n 10
files:
find . -printf ‘%s %p\n’|sort -nr|head
ending for bash scripts in mac
just call them .scpt
why not
easy rename in bash
rename 's/\IMG_2/\IMG_3/' *.JPG
renames the part in the Filename IMG_2 with IMG_3 rest is the same