Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm fairly new to unix and I was wondering if there's some attribute of ls that I can use to change the spacing between the files. Currently I've aliased my ls to output ls -G, so that I have colored folders. However, the downside of that is that the files/folders show up a little more squooshed/close together.

share|improve this question
1  
What does option -G have to do with colours? –  MPi Oct 19 '11 at 7:11
add comment

2 Answers

up vote 1 down vote accepted

You might be able to fix this by either running ls -G -T1, (or --tabsize=1 instead of -T1), or set TABSIZE=1 in your ~/.bashrc.

share|improve this answer
    
@Amit, can you please explain how this answer solved your problem? –  Mikel Feb 15 '11 at 22:32
add comment

I don't think ls -G does spacing any differently than ls.

The width depends on how long the file names are in each directory.

Try running /bin/ls and /bin/ls -G in the same directory, and you should notice the spacing is the same.

Then change to a different directory and try it again.

The other possibility is that you are seeing the difference between columns (-C) and across (-x) mode.

Try running ls -C and ls -x and see which one you prefer.

Then make it an alias.

share|improve this answer
    
I see, thanks for the suggestion!, I'll try it! and mark as correct if it helps! –  Amit Feb 10 '11 at 22:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.