LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 04-11-2015, 02:27 AM   #1
Birdman48
Member
 
Registered: Aug 2008
Location: Southern Maryland
Distribution: ubuntu 14.04 LTS
Posts: 93

Rep: Reputation: 0
ls command lists each file on separate line


Don't know how but now when I use ls I get list of files and directories on their own lines. I want the default behavior I had before. When I cd into another directory I have default behavior - horizontal list of files and folders.
 
Old 04-11-2015, 03:17 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Do:

Code:
ls -C
alias ls='ls -C '
 
Old 04-11-2015, 09:53 AM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 2,959

Rep: Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268
Quote:
Originally Posted by Birdman48 View Post
Don't know how but now when I use ls I get list of files and directories on their own lines. I want the default behavior I had before. When I cd into another directory I have default behavior - horizontal list of files and folders.
That just sounds like a directory that contains a file with a really long name, such that ls doesn't have room for a 2nd column.
 
Old 04-11-2015, 03:10 PM   #4
Birdman48
Member
 
Registered: Aug 2008
Location: Southern Maryland
Distribution: ubuntu 14.04 LTS
Posts: 93

Original Poster
Rep: Reputation: 0
You are correct - when I went full size window it was good. Thanks
 
Old 04-12-2015, 10:43 AM   #5
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,163
Blog Entries: 10

Rep: Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979
Quote:
Originally Posted by Birdman48 View Post
I want the default behavior I had before. When I cd into another directory I have default behavior - horizontal list of files and folders.
Uh, before what?
2 things to check/try:

Let's see what the system thinks of ls and cd, so open a terminal and issue:
Code:
type ls cd
Typical output is similar to
Code:
ls is aliased to `ls --color=auto'
cd is a shell builtin
IF
Code:
alias ls cd
doesn't show this for the cd output, you found the problem:
cd is a shell builtin

You can alter any alias's behavior short term by issuing
Code:
\ls
and long term by editing ~/.basrhc

Is there anything 'special' in your ~/.bashrc?

Assuming non-root user.

Edit: Seems you found the larger display/term working then.
Good job.

Last edited by Habitual; 04-12-2015 at 10:46 AM.
 
  


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 add separate command results together to place a file in particular location. Frankly3D Linux - Newbie 5 05-02-2013 01:23 PM
[SOLVED] Bash command like Ls that lists entire File System? theKbStockpiler Linux - General 7 09-21-2011 09:07 PM
LXer: How to create lists of WordPress posts from the command line LXer Syndicated Linux News 0 03-13-2011 03:00 AM
Command to separate 2nd line's 3rd word from a text file senthilvael Linux - Newbie 7 11-30-2007 12:36 AM
awk command to merge columns from two separate files into single file? johnpaulodonnell Linux - Newbie 4 01-23-2007 11:10 AM


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