Re: list files but not directory

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

 



> > 
> > ]$ find . -maxdepth 1 -type f ! -name '.*'
> > or,
> > ]$ find . -maxdepth 1 -type f ! -regex '^.*/\..*'
> > or,
> > ]$ ls -hl | grep ^-
> > 

This works fine 
but there is ./file as result
How can remove ./ in the command also?

 










> > And I am sure there are a dozen seperate perl
> solutions out there!
> > 
> Any of those would make a good function with a name that is
> easy to
> remember so you don't have to remember the complicated
> command.
> 
> > And on and on.  Count the learning curves and
> side issues involved for
> > someone who just wants to see some text file that they
> wrote and saved
> > and that has seemed to 'disappear'.  That kind of
> thing happens at the
> > start all the time.
> > 
> > Let me tell you about unnecessary learning
> curves.  About 5 years ago,
> > when I installed Linux for the first time, I
> tentatively began to
> > explore the Gnome desktop and menu.
> 
> God, I have been at this longer then I thought. My use of
> Linux
> predates the Gnome desktop...
> 
> > I saw Vi(m) -- a text editor.
> > Thinking of M$ NotePad, I opened Vim in order to make
> my first notes to
> > myself about this new operating system.  I
> couldn't write a word (I
> > didn't know about insert mode) and, determined not to
> solve problems by
> > just rebooting, it took me 4 -- let me repeat -- four
> hours to get out
> > of Vim. (Who would of thunk of escaping to normal mode
> and inputing a
> > ':' to get to a command line.)
> > 
> Yes, you should never try to use vi for the first time
> without a
> cheat sheet! For that matter, I normally set EDITOR so I
> get the
> editor of my choice by default instead of vi. (Another
> thing new
> users do not know about...)
> 
> > Most new users have already spent a considerable
> amount of time trying
> > to do the simplest thing before posting on users help
> list for the first
> > time out of fear of looking really really
> stupid.  Suggesting stuff like
> > "]$ find . -maxdepth 1 -type f ! -name '.*'" or 
> "'ls -hl | grep ^-'
> > just leaves their brains reeling. Particularly when
> they are in the
> > midst of trying to figure out how 10 to 20 other
> things work.
> > 
> Yes, it would be better to give an explanation along with
> the
> command. Some people do this better, and more consistently
> then others.
> 
> Mikkel
> -- 
> 
>   Do not meddle in the affairs of dragons,
> for thou art crunchy and taste good with Ketchup!
> 
> 
> -----Inline Attachment Follows-----
> 
> -- 
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
> Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


      __________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/

-- 
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