LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-18-2009, 02:08 PM   #1
mnardone
LQ Newbie
 
Registered: Apr 2009
Posts: 6

Rep: Reputation: 0
Unhappy Show Hidden Files


When I type in ls -la I know that shows me the hidden files. If I want to few them all How would I do that. I tried ls -la|less. Can someone help me .
 
Old 09-18-2009, 02:16 PM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
What doesn't work ?
Code:
ls -la|less
will show the files page per page
 
Old 09-18-2009, 02:28 PM   #3
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Maybe the OP just wants to see ONLY hidden files?
Code:
ls -la | egrep '\.[[:print:]]+\n' | less

Last edited by GrapefruiTgirl; 09-18-2009 at 03:02 PM. Reason: changed :alpha: to :print: to be sure all files/chars are included.
 
Old 09-18-2009, 02:33 PM   #4
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
repo: I'm taking a wild guess that he wants to view all his dot files in a pager, like 'less $(ls -A)', but that's not going to work well.

mnardone, if that is the case, maybe something like

less `find -maxdepth 1 -type f -name '.*' -exec file {} + | grep text | cut -d: -f1`

would show you all your top level dotfiles. But I can't imagine why you'd need to do this (viewing specific files or grepping general files for specific strings are more common things), so maybe try to restate so we can understand.

-- or maybe GrapefruiTgirl's got it.

Last edited by slakmagik; 09-18-2009 at 02:35 PM.
 
Old 09-19-2009, 07:57 PM   #5
mnardone
LQ Newbie
 
Registered: Apr 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by slakmagik View Post
repo: I'm taking a wild guess that he wants to view all his dot files in a pager, like 'less $(ls -A)', but that's not going to work well.

mnardone, if that is the case, maybe something like

less `find -maxdepth 1 -type f -name '.*' -exec file {} + | grep text | cut -d: -f1`

would show you all your top level dotfiles. But I can't imagine why you'd need to do this (viewing specific files or grepping general files for specific strings are more common things), so maybe try to restate so we can understand.

-- or maybe GrapefruiTgirl's got it.
That that works out great ?
 
Old 09-20-2009, 12:37 AM   #6
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Quote:
Originally Posted by mnardone View Post
That that works out great ?
Sorry, I don't understand.
 
  


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
show hidden files in shell lion_heart_300 Slackware 4 06-29-2006 07:28 AM
ls -->don show hidden files alaios Linux - General 2 07-25-2005 02:19 PM
Show hidden files and folders in Mac OS X Akiva Other *NIX 2 07-22-2005 10:54 PM
show hidden files in ooo 1.1.3 dinges Linux - Newbie 9 02-21-2005 06:51 AM
show hidden files on Redhat 9.0 dflorence Linux - Newbie 3 11-05-2003 11:11 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:08 AM.

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