The old blog · Tag
sys-admin
-
Bash: Get largest files in a directory
Tweet So you have a partition with a ton of subdirectories and the partition is almost full and you want to see if there are large files eating up space. There is an easy command you can run to list the 10 biggest files …
-
Remove Leading 0’s in Bash
Tweet So you have a var you want to remove leading 0’s on.. well do the follwing mzupan@mzupan-desktop:~$ var=00014 mzupan@mzupan-desktop:~$ let var=”10#$var” mzupan@mzupan-desktop:~$ echo …
-
Install puppet-dashboard on RedHat/CentOS 5
Tweet If you have a puppet network in place you will want to use puppet-dashboard. It is a fairly new project and still has some misssing pieces but overall a good way to tell the health of your puppet network. The …
-
Line breaks in command output redirect
Tweet Every now and then you need to save command output into a bash var from a command. Generally it looks like VAR=`command` That will put the stdout of command into $VAR There is an issue if the output has …
-
Bash Command Logger with Curl Support
Tweet There is a great project called Bash Paranoia. Right now their site is busted so I can’t link to it. Its a patch that applies to bash that allows commands to be logged to syslog. I basically took this one …