Thursday, February 22, 2007

Irritating or kewl feature? Recently used files

First of all, apologies for skipping 2 weeks. I was a bit under the weather.
I am back on track with some kewl tips.

Windows:
Whenever you install a new program in Windows XP, a very irritating balloon pops up next to the "START" button and in the “All Programs” menu, the new programs are highlighted. If you find this useful, cool but if, like me, this annoys you, you can disable it.
1. Right-click the “Start” button.
2. Select “Properties”.
3. Click the “Customize” button.
4. Choose the “Advanced” tab.
5. Under “Start Menu Settings”, uncheck the “Highlight newly installed programs” checkbox.
6. Press the “OK” button and then click the “OK” button again.
If you want to re-enable this, follow the instructions and check the “Highlight newly installed programs” checkbox in step 5.

Linux: (There is a nice bonus hint at the bottom)

Do you want to find the most recently changed files in a folder with lots of files and subdirectories?
One way is to use the “ls” command and combine it with a few flags. In addition, you can pipe it into “head” to see the 10 most recently modified files. The -t flag sorts the entries by the date they were last modified.
For example:
ls -lFt ¦head (The -F flag distinguishes different types of files and directories by adding extra characters (such as '/' for directories, '*' for executables, etc.)
There are many more flags to be used with “ls” so see the man pages – “man ls”.
To find all files which were modified within the last twenty-four hours, try the following: find / -mtime 1 or in a specific folder find . –mtime 1
If you want to find all files modified since midnight: find / -daystart -mtime 0

Bonus tip: (Supplied by the one and only Brian Hatch). http://www.ifokr.org/bri/
Do you use /usr/bin/less as your pager? Do you find yourself on machines where the screen clears when you exit it, for example when you're looking at a man page? Try setting your LESS variable to export LESS=MQieX
and that man page won't disappear, thwarting your attempts to reference the arguments you just looked up.

Thursday, February 1, 2007

system tools and schedules

Windows:
Windows XP Pro has a command line tool called systeminfo, which gives a whole lot of information on the system including motherboard info, the date the OS was installed, what patches have been installed, what processors you have, how much memory and virtual memory and lots more.

To access it, open a command promt and run “systeminfo”. You can output the data to a file by typing “systeminfo > c:\myfilename.txt” and then open “c:\myfilename.txt” to see all the info in a text editor.

You can also run a System Information window by clicking Start > All Programs > Accessories > System Tools > System Information. This also includes some cool system-checking tools in the “TOOLS” menu

Linux:

“at” what time do you want this one time job to run?

If you want a job to run once only, you could put it in “CRON” and then delete it later – or you could use the “at” command.

Example:

at 12:30
When you click Enter, you get the at> prompt

You then type in the command or script you want to run at the given time (in this example 12:30), hit enter and then Ctrl+D.

at> /usr/bin/improvemylife.sh

The above example will run the /usr/bin/improvemylife.sh program at 12:30. (Unless you are a script wizard, don’t expect this to actually improve your life)

You can see a list of all your at jobs with:
at -l

This will list all pending jobs including the job number.

You can remove a pending job with atrm

atrm 2
There are other ways to input the date and time you want the job to run. Just check the man page.

(By the way, you can also use the at command in windows. From a command prompt type “at /?” for the syntax)