Using alias to quickly complete common tasks

03/06/08

Permalink 03:38:48 pm, by Kieren Email , 124 words, 71 views English (GB)
Categories: Computing, Linux

Using alias to quickly complete common tasks

If you often use a command with arguments you probably started to get annoyed at having to retype it again and again. For example, if you’re searching the repositories in a Debian style distribution then you would use the command:

apt-cache search <program>

While typing this out isn’t amazingly difficult, using it several times a day will get tedious. Using alias you could do the following:

alias apts=’apt-cache search’

Now the command apts is effectively a shortcut to the longer command apt-cache search so to search the repository all you need to do now is:

apts <program>

One thing to be careful of though is making sure the alias you’re going to use isn’t already taken or a command.

Trackback address for this post:

This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

Comments, Trackbacks, Pingbacks:

No Comments/Trackbacks/Pingbacks for this post yet...

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

November 2008
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

Search

Categories

KBlog

XML Feeds

What is RSS?

Misc

b2evolution