LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-28-2007, 04:36 AM   #1
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Rep: Reputation: 30
how to list only hidden files


hi
what is the command to list only the hidden files
 
Old 12-28-2007, 04:44 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Hidden files are those with a starting dot... you can simply do
Code:
ls -ad .*
where the option d is to list directories without listing their content.

Last edited by colucix; 12-28-2007 at 04:46 AM.
 
Old 12-28-2007, 04:57 AM   #3
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
thanks

[bala@localhost ~]$ ls
bpgV1_vsipl_plot
Desktop
workspace
workspace1
workspace_kdchart
workspace_qtdemo

and


bala@localhost ~]$ ls -ad .*
. .emacs .ICEauthority .qt
.. .emacs.d .kde .recently-used
.assistant .esd_auth .local .rhn-applet.conf
.bash_history .fonts.cache-1 .mailcap .rhopenoffice1.1
.bash_logout .gconf .mcop .sversionrc
.bash_profile .gconfd .mcoprc .thumbnails
.bashrc .gnome .metacity .Trash
.canna .gnome2 .mime.types .viminfo
.config .gnome2_private .mozilla .Xauthority
.designer .gstreamer-0.8 .nautilus .xemacs
.dmrc .gtkrc .openoffice-install-log .zshrc
.eggcups .gtkrc-1.2-gnome2 .openoffice-lock


Quote:
where the option d is to list directories without listing their content.
i didn't get the directories listed

Last edited by babu198649; 12-28-2007 at 04:58 AM.
 
Old 12-28-2007, 04:59 AM   #4
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by babu198649 View Post
i didn't get the directories listed
Yes you did: .emacs.d, .mozilla, .kde are all directories.
 
Old 12-28-2007, 05:03 AM   #5
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
you mean hidden directories
 
Old 12-28-2007, 05:45 AM   #6
deepumnit
Member
 
Registered: Dec 2006
Location: NOIDA, India
Distribution: Debian, SUSE, Fedora
Posts: 334
Blog Entries: 1

Rep: Reputation: 31
Dude, thats <ls -al .*>. You can view in detail!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Bash scripting problem: Can't get a list of all files, including hidden ones oxi Programming 24 03-12-2007 07:19 AM
kmail list contacts hidden? patolfo Linux - Software 2 06-19-2006 04:40 PM
Hidden files? sonic04002 Linux - Newbie 2 11-09-2005 02:48 PM
hidden files Jeebizz Slackware 4 04-22-2005 08:18 PM
home directory files gone, hidden files remain Grasshopper Linux - Security 12 04-10-2005 09:23 PM


All times are GMT -5. The time now is 04:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration