LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-09-2009, 02:36 AM   #1
Vilius
Member
 
Registered: Jan 2006
Location: Lithuania
Distribution: Arch, Debian
Posts: 193

Rep: Reputation: 16
Match all files except directories ?


Hi,

What wildcards I should use to do that ?

thanks
Vilius
 
Old 02-09-2009, 02:49 AM   #2
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
I guess you could use this:

Code:
find /whatever/dir/ \! -type d
Note that this will list anything that's not a directory. It will also list symlinks, including those that point to directories, so be careful with whatever you are going to be doing. Also, the "!" needs escaping in bash because that character has a special meaning in bash. But if you are using another shell it might not be necessary.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying files and sub-directories of a directory except the directories named ".abc" sri1025 Linux - General 2 08-24-2010 08:53 AM
Select the files of a directory that match a specific pattern jianelisj Linux - Newbie 2 03-17-2008 12:25 PM
Updating header files to match source fallen3019 Linux - Kernel 3 05-22-2007 09:10 AM
compare two files in C and print the line when they do not match calorie712 Programming 7 04-13-2006 01:56 AM
CHMOD directories.sub-directories.files zerojosh Linux - Software 2 11-19-2005 03:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration