Re: list files but not directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ann kok wrote:
Hi
any way to list files but not directory

Some time ago, there were at least 116 useful combinations of arguments to ls.

UNIX is 40 years old, and ls was there ...

Whenever this question pops up, and it does quite often, I respond with a question.

"Why do you want to see just files?"
and
"What file types are you interested in?"

Which usually gets a response like: "How many different file types are there?" for which the answer is: "At least `egrep -v "^#" /usr/share/file/magic | wc -l`" (10179)

There are also some blank lines in the file, but you get the idea.

So now the question is:  "What files types do you want ls to list?"
and
"Did you try the 'F' argument?"

The 'F' argument to ls will attach a single character to the file name in order to identify what file types they are. Of course, only the common file types can be identified this way -- there are only some 96 displayable characters.

So we are back to the original question:

"What is it you are trying to do?"

The answer to that is very likely different from what you expected.

Good luck!

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux