Re: Need help with Linux Equivalent of a DOS command
From: Lester (dominoinsight_at_tiscali.co.uk.remove.this)
Date: 09/16/04
- Next message: Lester: "Please help: FontTransSocketUNIXConnect: Can't connect: errno = 61"
- Previous message: Mark Hobley: "CUPS - Help needed to configure generic ascii text printer"
- In reply to: David Raleigh Arnold: "Re: Need help with Linux Equivalent of a DOS command"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 15 Sep 2004 23:07:22 +0100
On Tue, 14 Sep 2004 13:15:36 -0400, David Raleigh Arnold
<darnold4@cox.net> wrote:
>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
Thanks very much for your very thorough answer. I have already had a
quick look at bash scripts so you've given me a good reason to look a
bit deeper.
- Next message: Lester: "Please help: FontTransSocketUNIXConnect: Can't connect: errno = 61"
- Previous message: Mark Hobley: "CUPS - Help needed to configure generic ascii text printer"
- In reply to: David Raleigh Arnold: "Re: Need help with Linux Equivalent of a DOS command"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|