Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find files 1

Status
Not open for further replies.

huBBLe

Programmer
May 15, 2001
50
SG
how do u list out hidden files (ie, wif a "." appended in front of the filename) only?

Thank You
 
think u misunderstood my question.

wat i need to do is to list all hidden files and NOTHING else. say if i have 5 files of the type ".XXXX". then only these 5 files will be listed out, ignoring the rest of the files.
 
If my reading of your question is correct:

find . -name '.*' -print

should give you a list of (only) .<something> files below where you initiate the find from. HTH.
 
Thanks Ken, it works!

the output this command gives is:
.
./.hiddenfile1
./.hiddenfile2
./.hiddenfile3

juz touch up the line u gave a bit to become: find . -name '.?*' -print | cut -f2 -d/

and i get:

.hiddenfile1
.hiddenfile2
.hiddenfile3

which is wat i need!

Thank You
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top