LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 01:27 AM   #1
Birdman48
Member
 
Registered: Aug 2008
Location: Southern Maryland
Distribution: ubuntu 14.04 LTS
Posts: 113

Rep: Reputation: 1
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, 02: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, 08:53 AM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
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, 02:10 PM   #4
Birdman48
Member
 
Registered: Aug 2008
Location: Southern Maryland
Distribution: ubuntu 14.04 LTS
Posts: 113

Original Poster
Rep: Reputation: 1
You are correct - when I went full size window it was good. Thanks
 
Old 04-12-2015, 09:43 AM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
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 09:46 AM.
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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