All Tips


6

Tip #387   Deleting whole words on a bash command line

To delete a word on a bash command line, hit ESC then backspace. Read more »

8

Tip #384   BBC Weather

Go to [http://www.bbc.co.uk/cgi-perl/weather/search/new_search.pl] and search for your location. Copy the link to the 3 day forecast feed, for example [http://feeds.bbc.co.uk/weather/feeds/rss/5day/world/0105.xml]. Then just put that link into the following command to get a quick command line weather forecast.

Read more »

9

Tip #381   SSH tab completion

tab completion is something we use all day long. put this into your .bash_profile. You can use tabs to auto complete the hostname for ssh calls.

Read more »

4

Tip #377   Alter autocompletion settings

Try changing the following in your ~/.inputrc to alter the behaviour of auto completion on application/file names:

set completion-ignore-case on
- performs filename matching and completion in a case-insensitive fashion. The default value is 'off'.

set completion-query-items 200
- number of possible completions that determines when the user is asked if they want to see the list of possibilities. The default limit is 100.

show-all-if-ambiguous
- if set to 'on', words which have more than one possible completion cause the matches to be listed immediately instead of ringing the bell. The default value is 'off'.

visible-stats
- if set to 'on', a character denoting a file's type is appended to the filename when listing possible completions. The default is 'off'. Read more »

19

Tip #376   Change prompt color dynamically

I'm frequently logged into multiple different boxes concurrently. To help me keep track of which box I'm working on at the moment, I have this in my .bashrc file, which I keep rsynced across the various boxes.

Read more »

96

Tip #375   Bash function to decompress archives

From dotfiles.org; original author unknown:

Read more »

2

Tip #367   MAC Address Spoofing on OS X

If you need to change your wireless MAC address (I had to do this when I used another computer to try to fix mine on a network with MAC filtering) this command comes in handy.

Pre 10.5(I know this works in Tiger but it should work 10.3 up):
Read more »

1

Tip #365   Ask questions, get answers, do something...

This a dialog script that asks the user a couple of questions and then does something with the answers.

It was something quick and dirty to accomplish a task I needed.

Read more »

9

Tip #363   Finding log files X number of days old and deleteing them.

This is a script that I recently wrote to find the logs of my IDP that were over 90 days old and delete them.

The script is pretty much self explanatory.

Read more »

7

Tip #362   Tar remote dir over SSH

If you work on remote boxes a lot, you ll probably need a to backup a directory from there onto your machine sooner or later.. This can easilly be done using ssh & tar; all in 1 line of (script friendly) code:

Read more »