FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 08-30-2008, 06:00 PM
"Joy Methew"
 
Default ls

Can anyone tell me how/where to get the source code for the ls command . I
have tried very hard but failed so far.


Thanks
Joy
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 08-30-2008, 06:09 PM
 
Default ls

There's no real source code for the ls command

Try looking through binutils or coreutils. But I highly doubt its in there either


Sent via BlackBerry from T-Mobile

-----Original Message-----
From: "Joy Methew" <ml4joy@gmail.com>

Date: Sat, 30 Aug 2008 14:00:02
To: General Red Hat Linux discussion list<redhat-list@redhat.com>
Subject: ls


Can anyone tell me how/where to get the source code for the ls command . I
have tried very hard but failed so far.


Thanks
Joy
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 08-30-2008, 06:10 PM
"Daniel Carrillo"
 
Default ls

2008/8/30 Joy Methew <ml4joy@gmail.com>:
> Can anyone tell me how/where to get the source code for the ls command . I
> have tried very hard but failed so far.

ls is part of coreutils package. Download the src.rpm or directly
http://ftp.gnu.org/gnu/coreutils/

BR.

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 08-31-2008, 08:35 PM
Paul Malinowski
 
Default ls

In future you can use a simple method of getting a source code:
a) determining which rpm contains a file by a command rpm -qf <file>
b) getting a source rpm with yum
*
Good luck!

*Paul Malinowski
+447795093450




----- Original Message ----
From: Joy Methew <ml4joy@gmail.com>
To: General Red Hat Linux discussion list <redhat-list@redhat.com>
Sent: Saturday, 30 August, 2008 19:00:02
Subject: ls

Can anyone tell me how/where to get the source code for the ls command . I
have tried very hard but failed so far.


Thanks
Joy
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list




--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 01-26-2010, 08:03 PM
Linda
 
Default ls

Is there a way to make ls silent if there is no match? I'm not finding
it in the options, but am hoping I'm just reading over it in the man page.
Thanks
Linda

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 01-26-2010, 08:17 PM
Johnneylee Rollins
 
Default ls

On Tue, Jan 26, 2010 at 1:03 PM, Linda <haniganwork@earthlink.net> wrote:
> Is there a way to make ls silent if there is no match? I'm not finding
> it in the options, but am hoping I'm just reading over it in the man page.
> * * * * Thanks
> * * * * *Linda
>
You can pipe it through to grep.
ls /home/johnneylee | grep Downlodas

~SpaceGhost
> --
> ubuntu-users mailing list
> ubuntu-users@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 01-26-2010, 09:12 PM
nepal
 
Default ls

On Tuesday 26 Jan 2010 21:03:53 Linda wrote:
> Is there a way to make ls silent if there is no match? I'm not
> finding it in the options, but am hoping I'm just reading over it
> in the man page. Thanks
> Linda
>

Hi Linda

File a bug report!

The correct response to *ls* for a non-existent target should be an
empty list.

nepal.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 01-26-2010, 10:17 PM
Werner Schram
 
Default ls

nepal wrote:
> On Tuesday 26 Jan 2010 21:03:53 Linda wrote:
>
>> Is there a way to make ls silent if there is no match? I'm not
>> finding it in the options, but am hoping I'm just reading over it
>> in the man page. Thanks
>> Linda
>>
>>
>
> Hi Linda
>
> File a bug report!
>
> The correct response to *ls* for a non-existent target should be an
> empty list.
>
> nepal.
>
ls does print an error message if you provide a filter which doesn't
yield a result (ls: cannot access ...: no such file or directory). I
think she is refering to that. But because the error message is sent to
the standard error output, you can dispose of it by using:

ls [non-existing filename] 2>/dev/null

Werner

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 01-26-2010, 10:39 PM
"Amedee Van Gasse (ub)"
 
Default ls

On Tue, January 26, 2010 23:12, nepal wrote:
> On Tuesday 26 Jan 2010 21:03:53 Linda wrote:
>> Is there a way to make ls silent if there is no match? I'm not
>> finding it in the options, but am hoping I'm just reading over it
>> in the man page. Thanks
>> Linda
>>
>
> Hi Linda
>
> File a bug report!
>
> The correct response to *ls* for a non-existent target should be an
> empty list.

Not true. For example:

amedee@intrepid:~/download$ ls q*
ls: kan geen toegang krijgen tot q*: Bestand of map bestaat niet


As an alternative, you could use find with xargs and feed that to ls. If
find doesn't find anything, nothing will be sent to ls and no output will
be produced.
As an additional advantage, this solves problems when you have directories
with thousands or millions of files.

--
Amedee


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 01-26-2010, 11:46 PM
nepal
 
Default ls

On Tuesday 26 Jan 2010 23:39:10 Amedee Van Gasse (ub) wrote:
> On Tue, January 26, 2010 23:12, nepal wrote:
> > On Tuesday 26 Jan 2010 21:03:53 Linda wrote:
> >> Is there a way to make ls silent if there is no match? I'm not
> >> finding it in the options, but am hoping I'm just reading over
> >> it in the man page. Thanks
> >> Linda
> >
> > Hi Linda
> >
> > File a bug report!
> >
> > The correct response to *ls* for a non-existent target should be
> > an empty list.
>
> Not true. For example:
>
> amedee@intrepid:~/download$ ls q*
> ls: kan geen toegang krijgen tot q*: Bestand of map bestaat niet

I have no idea what that is supposed to mean? If you say it is not
true can you *explain* please.

Let me put it another way then, the command "ls" is supposed to return
a list, that is the meaning of the shortened version of the word list
(ls). The command is not supposed to make clever comments like I
cannot find what you asked for. That is not what was asked for. Talk to
it like it is an idiot. "ls" is a command. I command you (computer) to
list whatever you find at this location.


Then fancy options like having a message display upon returned errors
can be provided to give the user the appropriate level of choice for
information returned. But the default should be the basic primary
function which is to return a list of a given location.

> As an alternative, you could use find with xargs and feed that to
> ls. If find doesn't find anything, nothing will be sent to ls and
> no output will be produced.
> As an additional advantage, this solves problems when you have
> directories with thousands or millions of files.
>
So I maintain that no output should be produced other than the actual
listing of a location, unless specifically requested by the user.
Actually providing information not asked for is a coder's problem (I
used to be but happily gave it up), it has now got to the point where
it has its own name, software bloat.

nepal.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 01:07 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org