Questions tagged [ls]

Command to list information about files.

Command to list information about files.

manpage.

69 questions
5
votes
1 answer

Who is the "author" of a file (Gnu "ls" manual)

In the manual for Gnu "ls," I see this: --author with -l, print the author of each file Does anybody know what the “author” of a file means in this context? This is (maybe?) not the file's owner, which is listed already with -l … or is…
BRPocock
  • 198
  • 6
5
votes
4 answers

Why might `ls --color=always` be slow for a small directory?

For a certain directory DIR on my system, the ls --color=always takes about 8 seconds, although it contains less than 10 files and subdirectories. Without the color argument it takes no time. Why would ls take so long with the color argument, and…
user9474
  • 2,448
  • 2
  • 25
  • 26
4
votes
1 answer

Folder size is greater than 4K on ext3

Lets say we have a default formatted ext3 filesystem, I run under the assumption that folders take 4K of space on the disk. But, what does it mean when a folder is bigger than 4K? Here is a pic of one such folder:…
Natalie Adams
  • 745
  • 1
  • 6
  • 16
4
votes
3 answers

du -sh * show significant more used space that ls -lah

I am having trouble with running out of diskspace of one of my clients servers. The output of the commands ls -lah in /var/lib/mysql shows: drwx------ 2 mysql mysql 16K Dec 30 2015 database_xyz But when I check the filesize in the same catalogue…
Orphans
  • 1,396
  • 2
  • 18
  • 30
4
votes
1 answer

sudo fine, sudo ls not working (command not found)

On Ubuntu 13.04 running in EC2, all commands through sudo work fine except ls. Here are some example commands to illustrate the issue: ubuntu at host in ~ $ sudo ls sudo: command: command not found ubuntu at host in ~ 1 $ sudo which…
Mike S
  • 420
  • 4
  • 13
4
votes
1 answer

Glob Not Match?

How to list files that don't match a glob? E.g., let's say I have a directory that contains hundreds of files, 97% of which have the filename extension .png. I know I can list the PNG files with: ls *.png But, how do I list the opposite, i.e., just…
ma11hew28
  • 799
  • 2
  • 9
  • 17
4
votes
1 answer

Cannot open files modified with Cygwin on Windows, clue in ls -l output

I can no longer open the tabs.html and tabs.js files indicated in the output below (2nd and 3rd out of four). Using cygwin I applied a patch to them. I believe the clue is in the ls -l output. Specifically, unlike the other files, at the end of…
Dexygen
  • 307
  • 1
  • 3
  • 8
3
votes
1 answer

After emptying a directory with 60,000 small files, ls -l still shows large directory size?

Here is the ls -l after I did rm -f inside the cur and new directories. I expected the directory "sizes" to shrink back to the default "4096". [root@example Maildir]# pwd /var/qmail/mailnames/example.com/noreply/Maildir [root@example Maildir]# ls…
Doochz
  • 141
  • 3
3
votes
1 answer

cp -R source_dir/* dest_dir/ does overwrite files?

I am trying to copy, recursively, the content of a directory to another using: cp -Rv source_dir/* dest_dir/ It seems that everything work ok but when I list that directory with ls -l the change data it is not updated to the current time. So, how…
rtacconi
  • 745
  • 4
  • 14
  • 28
2
votes
1 answer

ls -al stalls in an ssh session

I have a very strange problem when I log into a remote machine using ssh. Here's the scenario: I log into a remote machine using ssh (this machine in not in the local lan) I do ls (it works) I do ls -a (it works) I do ls -l (it works) I do ls -al…
Parag
  • 219
  • 1
  • 7
2
votes
3 answers

How to find largest files in a dir - ignoring directory sizes

I want to do something like this du -a | sort -rn | head But I want to extract files only, ignoring directories. To be clear, I want to traverse through all sub-directories but I don't want to find directory sizes. Just files sizes. UPDATE I also…
denormalizer
  • 491
  • 2
  • 5
  • 15
2
votes
2 answers

How to redirect ls to the cd command

I want to do ls | grep something and cd to the one thing that is listed. I tried with | and searched, but nothing found. Is it using xargs?
Vaska
  • 57
  • 3
2
votes
1 answer

'ls' taking a long time to list 20 subdirectories

I have a directory (my_dir) which has 20 sub directories. Every time I run 'ls' or try to autocomplete a file name in this directory my IO usage goes to 100% and it takes very long time (10 mins) to list 20 sub directories. Here is some background…
Kan
  • 29
  • 1
  • 4
2
votes
2 answers

Is there a way to ls -l with like a -f option (like tail -f)?

Suppose I am extracting a huge file or slowly building up a huge file. Is there a way to have ls -lh "on" much like tail -f, so that I can constantly see the size of the file grow until I decide to terminate it?
hobbes3
  • 615
  • 2
  • 10
  • 23
2
votes
4 answers

Cannot remove or list directory (ls or rm) Linux - Debian

I have a log file directory at /var/log/apache2/vhosts on a Debian dedicated server. Every day I split the main access_log into respective vhostname.com_access_log files in /var/log/apache2/vhosts In the last week or so I have noticed the server has…
user568829
  • 231
  • 1
  • 3
  • 8