Re: Need help with Linux Equivalent of a DOS command
From: David Raleigh Arnold (darnold4_at_cox.net)
Date: 09/14/04
- Previous message: manish rathi: "linux serial programming"
- In reply to: Lester: "Re: Need help with Linux Equivalent of a DOS command"
- Next in thread: Lester: "Re: Need help with Linux Equivalent of a DOS command"
- Reply: Lester: "Re: Need help with Linux Equivalent of a DOS command"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 14 Sep 2004 13:15:36 -0400
On Sun, 12 Sep 2004 19:57:52 +0100, Lester wrote:
> On Sun, 12 Sep 2004 15:20:28 GMT, A Nengineer <root@nowhere.inthe.cc>
> wrote:
>
>
>>>
>>But you can always make an "alias" of the command. Many people will
>>"alias" ls -l as "dir," for example. You might use "ddir" (meaning
>>"directory of directories) for instance.
>
>
> Oh no another thing I'm gonna have to learn! :-) Thanks very much, I
> shall look up aliasing.
That would be interesting, and it would be useful, but IMHO it would
be better to write a bash script to do it. Make a ~/bin directory, edit
ddir:
#!/bin/bash
ls -al | grep ^d
save it in *your* bin directory, not /bin, but /home/you/bin, or
~/bin for short. Then make it executable:
$ chmod +x ddir
Put your ~/bin directory in your path in ~/.bashrc
#path - this line is a comment
export PATH=$PATH:/home/dra/bin
Look at all the aliases in there! Point is that a bash script
is slower, but you can do more with it, and the difference
in speed won't be important unless you are using a machine
that is really really really old. Aliases are like DOS macros,
in memory, and bash scripts are like DOS batchfiles, on disk.
tree is prettier than ls for this. daveA
-- Paying more at the gas pump? Bush's Oil Sheikh Buddies, who support Al Qaeda, Palestinian terrorists, & hate-U.S. school systems everywhere, need more of your money now to arm and pay Iraqis to kill Americans. D. Raleigh Arnold dra@ (http://www.) openguitar.com darnold4@cox.net
- Previous message: manish rathi: "linux serial programming"
- In reply to: Lester: "Re: Need help with Linux Equivalent of a DOS command"
- Next in thread: Lester: "Re: Need help with Linux Equivalent of a DOS command"
- Reply: Lester: "Re: Need help with Linux Equivalent of a DOS command"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|