Articles
- Delete files based on last modified date

First create some files to test with: touch -d 01/01/2015 newfile touch -d 01/01/2009 oldfile Check it worked. using ls -l osaka@rika:~/test$ ls -l total 0 -rw-r–r– 1 osaka osaka 0 Jan 1 2015 newfile -rw-r–r– 1 osaka osaka 0 Jan 1 2009 oldfile And now delete all files which where last modified over one [...]

No comments

- route add default gateway

Use the route command to set a list all network routes on your machine. To set a default gateway: route add default gw 10.0.0.1 eth0

No comments

- Get a list of filenames and move the files Bash and Power Shell

Both these scripts do the same thing, they strip a log file down to the filename and then move each file up a directory. … C:\Random\Directory\n\chars\long\filename.xml … BASH cat 15\ August\ 2011\ Less.log | cut -c 113-152 > fileNames for i in `cat fileNames`; do mv -v “$i” ../$i; done WINDOWS gc ‘.\15 August 2011 [...]

No comments

- VirtualBox: Boot a virtual machine from a USB

I wanted to install some software on to an OS which was installed on a USB flash drive, so I created a virtual machine that booted up of the USB drive. I found it needed root permissions, and it is probably a good idea to un-mount the device before hand. VBoxManage internalcommands createrawvmdk -filename ./HardDisks/USB-test.vmdk [...]

No comments

- DHCP3-Server failing to start?

When I was troubleshooting a DHCP Server, I found that in the /etc/dhcp3/dhcpd.conf file someone had declared a subnet with an IP range which was not the same as the server. For example, this would not work: Interface: 192.168.1.1 subnet 192.168.0.0 netmask 255.255.255.0 {} But this would: subnet 192.168.1.0 netmask 255.255.255.0 {} Because the subnet [...]

No comments

- Life Tip

Eat your breakfast before you goto bed… then sleep for longer in the morning! Click for full size 1920×1200 – http://wallbase.cc/wallpaper/264803

No comments

- Synergy Config

To get synergy working, both the client and the server need to have a /etc/synergy.conf file, like the one below. make sure to replace “server” and “client” with their respective hostnames: section: screens server: client: end section: aliases server: 10.0.0.2 end section: aliases client: 10.0.0.50 end section: aliases server: 10.0.0.2 end section: links server: left [...]

No comments

- Find out your Ubuntu/Debian Release

lsb_release -c or cat /etc/debian_version I can never remember, and now you don’t have to.

No comments

- Windows Server 2008 USB WiFi

Make sure to enable “Wireless Lan Service” Feature. After a fresh install of Windows Server 2008, I was unable to enable my USB Wireless Device, windows would attempt to enable it but the interface would not active. Problem solved by enable the “Wireless Lan Service” Feature.

No comments

- Get the first n chars for each line of a file

cat file | colrm n File’s contents: 8765 I like eating pie 8956 Sometimes I think I’m a robot 8796 I wonder what being a cat is like 4567 Time for food 4523 Pew Pew pew Space pope8765 I like eating pie cat file | colrm 4 Output: 876 895 879 456 452 Hope that [...]

No comments