S1E1.avi
S1E2.avi
S1E3.avi
S1E4.avi
zmv 'S([0-9])E([0-9]).(*)' 'S${(l:2::0:)1}E${(l:2::0:)2}.$3'
They'd now be renamed as follows:S01E01.avi
S01E02.avi
S01E03.avi
S01E04.avi
Helpful bits and bytes
zmv 'S([0-9])E([0-9]).(*)' 'S${(l:2::0:)1}E${(l:2::0:)2}.$3'
They'd now be renamed as follows:
zmv 'S([0-9][0-9])E([0-9][0-9]).(*)' 'S$1E${(l:2::0:)$((($2 * 2) - 1))}-E${(l:2::0:)$(($2 * 2))}.$3'
They'd now be renamed as follows:
cat /etc/virtual/usage/$user.bytes | grep outgoing | awk -F= '{print $4}' | awk -F\& '{print $1}' | sort | uniq -c | sort -n
grep cwd /var/log/exim_mainlog | grep -v /var/spool | awk -F"cwd=" '{print $2}' | awk '{print $1}' | sort | uniq -c | sort -n
grep cwd /var/log/exim/mainlog | grep -v /var/spool | awk -F"cwd=" '{print $2}' | awk '{print $1}' | sort | uniq -c | sort -n
zmv 'Season (*)/([0-9])(*) - (*).mkv' 'Season $1/{showtitle} - S0$2E$3 - $4.mkv'
This should leave you with:
for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n -r | less
ln -s /usr/local/cpanel/3rdparty/bin/freshclam /usr/local/bin/freshclam ln -s /usr/local/cpanel/3rdparty/bin/clamscan /usr/local/bin/clamscan ln -s /usr/local/cpanel/3rdparty/bin/clamd /usr/local/bin/clamd ln -s /usr/local/cpanel/3rdparty/bin/clamav-config /usr/local/bin/clamav-config
/scripts/update_local_rpm_versions --edit target_settings.clamav installed /scripts/check_cpanel_rpms --fix --targets=clamav
find . -type f -print0 | xargs -0 wc -l | awk '$1==1{print $2}'
...an alternate version:
find . -type f -exec sh -c '[ 1 -eq $(wc -l {}|cut -d" " -f1) ] && echo {}' \;
kill -9 `ps -ef | grep processname | grep -v grep | awk '{print $2}'`
MegaCli -LDSetProp -Cached -LAll -aAll MegaCli -LDGetProp -DskCache -LAll -aALL MegaCli -LDSetProp EnDskCache -LAll -aAll
/usr/local/cpanel/bin/tailwatchd -–disable=Cpanel::TailWatch::EximstatsYou may want to truncate the related tables for eximstats in MySQL before doing this (to save time if they are crashed,etc) but is not required nor necessary as the above will clear the tables (but will bawk if they are crashed, etc)
mysql_install_db --user=mysqlYou may also encounter this error in part when trying to start/stop/restart the service and see:
ERROR! MySQL server PID file could not be found!...which usually reveals itself in the err log in /var/lib/mysql
find . -name '*.php' -exec sed -i '1 s/^<?php.*$/<?php/g' {} \;
Once completed, you should inspect your logs and upgrade your software to avoid future incidents.
find . -path ./wp-content/themes -prune -o -name '*.php' -exec sed -i '1 s/^<?php.*$/<?php/g' {} \;
LogLevel=quietIf you want to suppress this output per-command, add the following to your SSH command:
-o LogLevel=quiet
SELECT id,user,db,command,time,state FROM INFORMATION_SCHEMA.PROCESSLIST order by user;