Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-30-2012
pandeesh's Avatar
Registered User
 
Join Date: Jul 2011
Posts: 313
Thanks: 76
Thanked 12 Times in 12 Posts
Hidden files

How to list out only the hidden files from a directory ?

Thanks
Sponsored Links
    #2  
Old 06-30-2012
spacebar's Avatar
Registered User
 
Join Date: Oct 2009
Location: spaceBAR Central
Posts: 304
Thanks: 0
Thanked 59 Times in 59 Posts
Try this:

Code:
ls -al | grep -e '[0-9] \..*$'

Sponsored Links
    #3  
Old 06-30-2012
Scrutinizer's Avatar
Moderator
 
Join Date: Nov 2008
Location: Amsterdam
Posts: 7,350
Thanks: 144
Thanked 1,756 Times in 1,593 Posts
Try: ls -d .*
The Following User Says Thank You to Scrutinizer For This Useful Post:
pandeesh (06-30-2012)
    #4  
Old 07-02-2012
Registered User
 
Join Date: Mar 2012
Posts: 23
Thanks: 5
Thanked 1 Time in 1 Post

Code:
ls -a | grep "^\."

Moderator's Comments:
Please view this code tag video for how to use code tags when posting code and data.

Last edited by vbe; 07-02-2012 at 09:03 AM..
Sponsored Links
    #5  
Old 07-02-2012
Registered User
 
Join Date: May 2012
Posts: 28
Thanks: 3
Thanked 2 Times in 2 Posts
you could also try:


Code:
ls -la | cat -vet

this will let you see any files containing special characters or named with just a special character that isn't normally displayed
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
hidden files lhareigh890 UNIX for Dummies Questions & Answers 10 01-13-2011 09:49 PM
how to display only hidden files useless79 Shell Programming and Scripting 7 11-12-2008 04:50 AM
Toggle Hidden Files Mac OS X Omniwheel Shell Programming and Scripting 0 07-07-2008 11:35 PM
Hidden Files in Linux Arun.Kakarla UNIX for Dummies Questions & Answers 3 07-05-2008 04:45 PM
Finding Hidden files and protecting the folder containing hidden files from deletion pochaw Shell Programming and Scripting 4 12-22-2007 12:33 AM



All times are GMT -4. The time now is 07:36 PM.