24
votes
2answers
672 views

Why does ls -l output a different size from ls -s?

I can't figure out why I'm getting the following results: ls -l tells me the size of a given file (HISTORY) is "581944": $ ls -l HISTORY -rw-rw-r-- 1 waldir waldir 581944 Feb 22 10:59 HISTORY ls ...
0
votes
1answer
62 views

Bash command: ls -lah not showing /etc directory?

Ok guys, elementary question. I was poking around my server, and I noticed that when I 'ls' the / directory, /etc folder is not displayed. Why is that? I can very easily cd into it, but why is it ...
6
votes
2answers
118 views

Colorize hardlinks in ls output?

How can I colorize hardlinks myself? Turns out on an old Ubuntu 10.04 I have, this happens by default (same .bashrc and .profile in use), whereas on the newer Ubuntu 12.04 it doesn't. This is the ...
8
votes
7answers
3k views

How to move multiple files at once to a specific destination directory?

I got a bunch of files in some directory (along with many other files) that I want to move. Luckily, all the files I want to move contain a certain identifier in their names, so I can ls | grep ...
6
votes
2answers
231 views

What does the l command do?

There is a command l available on my machine which appears to do nothing. which l also produces no output. Is this a real command, and does it actually do anything?
1
vote
1answer
134 views

Right way to colorize ls?

Sometimes ago, I used Ubuntu and had colorized ls, grep "out of the box". Now I install KUbuntu and ls is plain text by default. I tried to discover something about it and notice that there is ...
1
vote
1answer
70 views

Why are “ls” and “stat” returning different ownerships for the same object?

This is in a continuation of question here I run this command as root user chown someuser:someuser /mnt/my-address and then # ls -l /mnt/my-address response is total 16 drwx------ 2 root root ...
0
votes
1answer
113 views

Can I change the default of “block-size” in commands?

Several commands use --block-size 1K as the default and I find myself counting numbers. Is there a way to automatically and permanently change the block-size of commands like du,ls,df to greater ...
19
votes
2answers
4k views

Difference between 'dir' and 'ls' terminal commands?

I've been trying to find the difference between using the dir and ls commands in terminal. I know ls is the traditional unix method of viewing the files in a directory, and that dir is the windows ...
7
votes
3answers
865 views

How to find all PDF files in directories and their subdirectories?

I want to list all PDF files in the directories of the current working directory. What command can do this? I remember a combination of ls and */*.pdf but don't remember what exact combination.
6
votes
1answer
168 views

automatically run ls after changing path using autocd

So everytime I change the directory I would like the new path to automatically get listed with ls.There are solutions if the path gets changed using cd but I never found a solution that would work ...
4
votes
2answers
976 views

Is there a way to do a ' ls -R | grep “aname”* | rm; to remove multiple files in multiple directory

I have installed (compiled) emerald. The command make uninstall didn't work (there is no makefile as it is just a script). So I decided to remove the file manually. But there were a lot of files. ...
1
vote
1answer
150 views

subshell ls -lh “$(find /music -type d)” doesn't return list, instead results of find command

I'm trying to list the details of all the directories in my music folder using the following command: ls -lh "$(find /music -type d)" However all I get is the return of the find command. Is this ...
5
votes
3answers
170 views

How do you get details from the output of the locate command?

When I run the ls -l command I get details about the files in the current directory like permissions, owner, group, file size. Is there a way I can get these same details instead of just the ...
4
votes
2answers
3k views

How can I direct a pipe input to ls command?

When I type sth. like that find . -name *foo* | ls -lah it gives me a ls-output of 'pwd' like I had no file(s) given to 'ls'. To simply use ls -lah $( find . -name *foo* ) works well (when the ...
4
votes
1answer
631 views

Why does ls -lh give me ls: invalid option — 'h'

I'm using Interpid (I know I need to upgrade). When I try and use the -h option with ls I get an error. I swear this used to work, and the man page says it should. Any ideas? $ sudo ls -lh ls: ...
12
votes
3answers
4k views

How to activate pagination for ls command?

What is the equivalent option for the ls command to activate pagination as in DOS the dir /p does?
9
votes
5answers
3k views

In the output of 'ls -n', what does the the second column mean?

When I run: ls -n I get something like: -rwxrwxrwx 1 1000 1000 765528 2009-10-15 18:41 file1 drwxr-xr-x 10 1000 1000 4096 2010-12-07 20:50 dir1 drwxr-xr-x 3 1000 1000 4096 2010-10-24 ...