Hello, please sign in or register
You are here: Home

Linux

Reporting low disk space on a linux system. Requires the `mail` setup. Add this line to crontab, replace your email address with the following {{{ 10 7 * * * ( df | grep [7-9].% ) && df | mail -s "Low space" name@addrew.com }}}
Created 08/04/09
There seems to be two ways to omit hidden files, the first one was an unexpected discovery and works on the route of the directory youre copying from. {{{ rsync /source/* /target/ }}} And {{{ rsync --exclude=".*" /source/ /target/ }}}
Created 11/11/08
A lightweight extreme simple MTA is SSMTP. Which is a great alternative to sendmail. And is perfect if you dont need to recieve emails using sendmail either.
Created 30/09/08
A development server gets nightly builds of our live data with many GB being inserted and deleted. `df` eventually displays filesystem usage at 100%, whilst `du / -sh` shows a more modest value
Created 29/08/08
Count the number of lines in your project. Count the number and size of files uploaded in a given period.
Created 18/04/08
Emulate IE 6 on a linux box via WINE
Created 06/12/07
A alias Create an alias awk Find and Replace text within file(s)
Created 28/04/07
Preface The GD libabry lets you use PHP to create and edit images. So you can resize user image uploads. By default the GD libary comes in most distributions of PHP, but... Heck i'm harping on because i dont have the privilege, and i assume neithe...
Created 28/04/07
Preface I have scowered the internet in search of a decent article on enabling mod_proxy on Linux. Damn, make it hard! ==External Links== * [http://www.devshed.com/c/a/Apache/Getting-Started-with-Apache-2-0-Part-III/ Getting Started with Apache...
Created 28/04/07
Preface Controversially, i am taking on my window cleaning colleagues with some *n*x operating software. Amongst the barrage of recommendations for Linux distributions, i concluded Fedora Core 4 had the right attributes. The attributes included: e...
Created 28/04/07
To simply open a file without editing use {{{less __filename__}}} ¯¿½ if you want to edit, forget this.From command line, to open a file for editing type {{{vi __filename__}}} You¯¿½ll see the top of the document and... ¯¿½--- More---¯¿½ ...at the...
Created 28/04/07
To view the boot process function start and stop {{{ /sbin/chkconfig --list}}}
Created 28/04/07
{{{ iptables -P INPUT DROP iptables -A INPUT -i ! ${UPLINK} -j ACCEPT iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT #our new rule follows iptables -A INPUT -p tcp --dport http -m state --state NEW -j ACCEPT iptables -...
Created 28/04/07
I have to run some cron jobs on my linux server, the script uses the bash function {{{cp}}} and {{{chmod}}}, etc... Which can normally be type into the command shell, additionally it uses the mysql function 'REPAIR TABLE'. There are three differen...
Created 28/04/07
Its always the way, either know something implicitly, or dont know it. This is how i feel about SendMail. urgghhh. Partly because i cant find a simple guide of 'How to mail'. So anyway this is what i want to achieve, my goals, as it were, of a ma...
Created 28/04/07
Connect to a share on another computer which is either windows or Linux. {{{ #!shell # Interchange Admiistrator for which ever username you can access the remote PC smbclient -U "Administrator" //192.168.1.14/myshare }}} Recursively Copy the...
Created 28/04/07
Setup a sendmail email client to use a particular mail exchange ensure sendmail.mc has the following lines. ''/etc/mail/sendmail.mc '' {{{ ... define(`SMART_HOST',`mailservers.mydomain.com')dnl MASQUERADE_AS(`myothersite.com')dnl FEATURE(ma...
Created 28/04/07
I got to grab a 5 gb file over an FTP. Since it takes over a day i found this bash script to cron the job and autorun in the early hours of the morning. {{{ #!/bin/sh ftp -n ftpsite.com < quote user ausername quote pass apassword binary ge...
Created 28/04/07
Changing IP for the local LAN {{{ ifconfig eth0 10.0.0.85 netmask 255.255.0.0 up }}}
Created 28/04/07
Loops using bash for i in do echo i done
Created 28/04/07

Subscribe: | RSS

Categories