Latest Updates: tips

  • Using grep to Exclude Lines Containing Certain Characters/Text

    04:37 on January 10, 2010 | 0 Comments Tweet This! | Digg This!
    Tags: , , tips

    I like to watch Apache log files using tail -f but they often get filled up with data I don’t want/need to see – like, when I access the web site.

    grep is a great tool to search for certain information in text files – but it can also exclude certain pieces of information which can be equally as useful.

    So, for example, if I want to watch a log file using tail -f, but exclude any information relating to the IP address “192.168.1.101″ then we can use the grep -v switch:

    tail -f access.log | grep -v "192.168.1.101"

    What this will do is show everything, apart from a line with that IP address in.

    Of course, this works with any other command with text being piped into grep:

    cat file.txt | grep -v "heh"

    This would output the contents of file.txt but remove any lines with “heh” in them.

    You can find out more about the various grep options in it’s man page (man grep from the command line)

     
  • What is Aero Glass Remoting? Terminal Server Aero Glass? (Windows Server 2008 R2)

    10:23 on January 9, 2010 | 0 Comments Tweet This! | Digg This!
    Tags: tips,

    What is Aero Glass Remoting?

    Can I use Aero Glass on a remote Terminal Services/Remote Desktop session?

    Well, with Windows Server 2008 R2, Yes you can!

    It’s basically replicating the user experience you get locally of Aero Glass, on remote sessions.  It may be useful for task switching etc. Check the guide out below:

    http://blogs.msdn.com/rds/archive/2009/06/23/aero-glass-remoting-in-windows-server-2008-r2.aspx

     
  • Checking the Uptime of your OS X Machine

    03:45 on January 8, 2010 | 0 Comments Tweet This! | Digg This!
    Tags: , tips

    Uptime, uptime, uptime.  Everyone loves massive uptime, right?

    The “Who’s PC has been on the longest without a reboot?” sort of challenges.

    Well, finding out the uptime on an OS X machine is quite easy!

    If you open a Terminal (by using Spotlight, then searching for Terminal or open Applications/Utilities and double click Terminal) and then type:

    uptime

    … so it looks something like this:

    user@mac:~$ uptime
    23:46  up 11:55, 3 users, load averages: 0.17 0.21 0.23

    There is multiple parts of information from this command.  The part we’re focusing on is the second part:  ”up  11:55″.  This means that the machine I’m currently on has been booted up for 11 hours and 55 minutes.

    So, what’s your uptime?  How often do you manually restart your computer?  Let me know via comments below!