Questions tagged [ls]

Command to list information about files.

Command to list information about files.

manpage.

68 questions
127
votes
2 answers

Colors in bash after piping through less?

When I have dircolors defined life is full of... color. When I pipe ls through less to scroll around I lose the colors. Any suggestions?
MathewC
  • 6,877
  • 9
  • 38
  • 53
34
votes
4 answers

What is the difference between du -h and ls -lh?

I am having a difficult time grasping what is the correct way to read the size of the files since each command gives you varying results. I also came across a post at…
PeanutsMonkey
  • 1,832
  • 8
  • 26
  • 27
31
votes
8 answers

How do I exclude directories when listing files?

How do I exclude directories when listing files in the current directory? ls . ^ will include directories in the listing.
Stephen Watkins
  • 529
  • 2
  • 5
  • 11
23
votes
3 answers

FreeBSD: How to know real file size on zfs with compression on?

I'm using zfs on my FreeBSD 9.0 x64 and pretty happy with it, but I find it hard to count directory real, not compressed, size. Surely I can walk over the directory and count every file size with ls, but I'd expect some extra key for du for that…
Alexander
  • 724
  • 2
  • 11
  • 19
21
votes
2 answers

Very strange file size (more than 600 PB) on a small filesystem

I had a file on an XFS filesystem which size was about 200 GB. It was a QCOW2 image containing a virtual disk of a KVM-driven virtual machine. Something went wrong (maybe it was some glitch of qemu-kvm, I'm not sure), the virtual machine had crashed…
Volodymyr Melnyk
  • 537
  • 5
  • 18
20
votes
2 answers

Ubuntu - * at the end of filename?

In Ubuntu 10.10, showing a file listing using ll will occasionally show files with a * appended to the name of the file. What does this star mean?
Chris Henry
  • 1,512
  • 3
  • 15
  • 15
19
votes
4 answers

Absolute path with ls?

How can I make the ls command show a file's full path instead of just its filename? With all its options, there must be a way, right?
An̲̳̳drew
  • 1,265
  • 2
  • 14
  • 19
16
votes
2 answers

What does the new full stop / period mean in the RHEL6 ls output?

We have scripts looking at the output of ls -l output for permission information that have been failing recently on RHEL v6 systems which appear to be showing an extra . at the end of the permission entry that didn't used to be there…
Rob Oxspring
  • 285
  • 1
  • 4
  • 7
16
votes
2 answers

What does the "@" sign mean in ls -l output?

I have this output on MacOSX: $ ls -l total 40 -rwxr-xr-x@ 1 levente staff 52 30 Sep 15:38 pl -rwxr-xr-x 1 levente staff 675 14 Feb 17:07 plplay -rwxr-xr-x@ 1 levente staff 662 26 Jan 14:13 plstart -rwxr-xr-x@ 1 levente staff 296 1 Dec…
Leventix
  • 263
  • 2
  • 6
14
votes
4 answers

changing colors of files/dirs in linux ls

I use putty with a black background and was wondering if there was or is a way to change the colors of the dirs which are dark blue. i noticed DIR_COLORS.xterm and DIR_COLORS do they play this role?
Mike Janson
  • 277
  • 1
  • 5
  • 10
10
votes
3 answers

What is the alternative to ls --time-style=full-iso in BSD?

command in Linux $ ls -lt --time-style=full-iso output ... -rw-r--r-- 1 mduda mduda 1855 2009-08-26 13:07:55.000000000 +0200 screen-configurations.xml drwxr-xr-x 2 mduda mduda 4096 2009-08-26 13:07:22.000000000 +0200 Documents drwxr-xr-x 2…
Mad_Dud
  • 268
  • 4
  • 10
9
votes
3 answers

ls gives me "illegal option"

I recently installed zsh and now whenever I ls or ls -l or ls anything I get "illegal option". Not sure where to start looking to fix this.
pondermatic
  • 227
  • 2
  • 6
8
votes
2 answers

df showing wrong disk size

Df -h is showing a wrong empty space on my server, for one of the disks: /dev/sda2 450G 393G 34G 93% / Cpanel shows that it has only 34GB free, but there is a lot more. A few minutes ago, I removed over 80GB of log files. So, I'm…
valter
  • 689
  • 5
  • 13
  • 23
6
votes
1 answer

`ls` causes Segmentation Fault on a specific directory

I used $HOME/.local as prefix to install some applications without root access. There is one directory inside $HOME/.local that I can't execute ls command: [tuananh@server lib]$ ls Segmentation fault [tuananh@server lib]$ cd .. [tuananh@server…
5
votes
3 answers

How to Fix Directory with all Question Marks as Permissions

I'm using CentOS 7 and trying to list a directory's contents but can't. When I try to list the contents, I get the following output: [entpnerd@myhost ~]$ ls -ali /data/sharedlogs/otherhost/ ls: cannot access /data/sharedlogs/otherhost/vcs: Not a…
entpnerd
  • 155
  • 1
  • 6
1
2 3 4 5