LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-23-2004, 08:45 AM   #1
Creep
LQ Newbie
 
Registered: Dec 2002
Distribution: Gentoo & Debian
Posts: 25

Rep: Reputation: 15
Question Make ls exclude symlinks


I'm trying to find a way to do 'ls -la' without a bunch of symlinks showing up in the directory listing. The reason is that my home-directory has a bunch of dotfiles symlinked to another directory, and when I type 'ls -la' to see the dotfiles which are not symlinked, the listing is cluttered by a bunch of nasty-looking symlinks. I tried piping ls's output a sed-script and some grepping here and there, but I couldn't find a good way to do it. If anyone of you knows of a simpler way to do it (such as an internal ls-flag ), I'd really appreciate it. Thanks.

Last edited by Creep; 01-23-2004 at 08:58 AM.
 
Old 01-23-2004, 10:13 AM   #2
Nis
Member
 
Registered: Jul 2003
Location: Virginia
Distribution: Ubuntu Hoary (5.04)
Posts: 550

Rep: Reputation: 31
Check out 'man ls'. I can't do it right now (I'm forced to used a Win Box here) but I remember there is a way to filter what is output.
 
Old 01-23-2004, 05:28 PM   #3
Creep
LQ Newbie
 
Registered: Dec 2002
Distribution: Gentoo & Debian
Posts: 25

Original Poster
Rep: Reputation: 15
I forgot to mention that I spend an hour and a half reading the manpage of ls trying different things here and there. I didn't find any useful information to solve my problem there though. Thanks for trying to help anyway.
 
Old 01-23-2004, 06:21 PM   #4
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
Code:
ls -p | grep -v @
If you want to get it back to displaying columns:
Code:
ls -p | grep -v @ | column
By the way, this will ignore any file including a "@", so there may be a better way.

Last edited by mikshaw; 01-23-2004 at 06:32 PM.
 
  


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
How to make cp ignore subdirectories? M4l3k Linux - Newbie 4 02-28-2011 01:48 PM
How can I get make to ignore a particular error? SheldonPlankton Linux - Software 1 08-05-2004 02:44 PM
how to make Linux ignore hardware? netmanw00t Linux - Hardware 3 07-11-2004 04:33 AM
make symlinks jazernorth Linux From Scratch 1 03-20-2004 01:22 PM
'make symlinks' doesn't work rdaves@earthlink.net Linux - Software 1 05-30-2001 07:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:45 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