Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How can I use find command to find every type of the file (not just -type f but also specials such as sockets, device files etc.) but ommiting dirs?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

Use negation.

find . ! -type d -print

Also see http://mywiki.wooledge.org/UsingFind

share|improve this answer

You can have o look at find manual, but I doubt it is the proper way to find sockets and/or device files... I think the program to find such a device is a different one, don't remember what exactly right now, sorry!

share|improve this answer
    
I'm familiar with find's manual page. There is a way to get e.g. only sockets (e.g. myusql.sock) or only regular files, but not all at once. –  bass Jun 5 '12 at 10:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.