nDarkness

Software

Linux System Update Script

by on Nov.06, 2009, under Linux, Utilities

In my experience with Linux distributions, Slackware and Ubuntu/Kubuntu, there are a couple of different methods used to update the system. Of course we can always use a gui to do the updates but what fun is that?

The two commands used to update a Debian based system are:

safety@nDarkness:~/bin$ sudo apt-get update; sudo apt-get upgrade

Now while this doesn’t require a great deal of typing, let’s see if we can shorten it to suit our needs.

If you do not already have somewhere to store your personal scripts, the following command will do this for you and allow you to enter the code we will use:

safety@nDarkness:~$ mkdir bin; cd bin; vi apt-auto

Press i for insert and create the following script:

#!/bin/bash

sudo apt-get update; sudo apt-get upgrade

This is all we need to type for our script to produce the results we are looking for. Now let’s save our script by pressing Esc => :wq => .

To run our script we can type:

safety@nDarkness:~/bin$ bash ./apt-auto

You should see the output from the two commands used in the script printed to the screen. Now let’s make our script executable so we don’t have to type bash to make it run.

The following command will accomplish what we are looking for:

safety@nDarkness:~/bin$ chmod +x apt-auto

Now to run our command we simply need to type:

safety@nDarkness:~/bin$ ./apt-auto

We now have a working script to do our update process and it is significantly shorter than the first option we used. As always all comments are welcomed.

Leave a Comment :, , , more...

Quickly Rename Folders and Files in Windows for Free

by on Oct.13, 2009, under Utilities, Windows

FoldersHave you ever needed to rename a bulk quantity of files and/or folders? In my day to day life, I use template folder structures to contain various aspects of job information. Before these folders are usable, I must add a unique job name to the beginning of the folder and/or file name to make searching easier. This renaming task can quickly become very tedious and time consuming.

Thanks to Denis Kozlov over at [den4b] there is a solution that saves loads of time and effort. The program is called, ReNamer and it allows us to select a list of files and/or folders and perform various renaming operations on them.

Since the task at hand is to work on already designed folder structures, all I need to do is find a method that does the job and save the preset for the different types folder structures. I chose to use a delete rule to remove the generic job name and then an insert rule to insert a unique job name.

After going through a few short test runs, I came up with a working solution that I was able to
save, customize and slightly change to suit other needs.

If you have similar renaming needs, check out this
program and I’m sure you will agree it is definitely worth your time.

Leave a Comment :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...