Questions tagged as ['ls']

Questions relating to the Linux 'list' command (ls)
Score: 0
why is /bin/ls linking to libpthread?
cn flag

so strange, is ls multi-threaded somehow? what could ls possibly need libpthread for?

ldd /bin/ls (0x00007ffff7fce000) => /lib/x86_64-linux-gnu/ (0x00007ffff7f57000) => /lib/x86_64-linux-gnu/ (0x00007ffff7d65000) => /usr/lib/x86_64-linux-gnu/ (0x00007ffff7cd2000) => / ...
Score: 2
Understanding command ls .*
us flag

I found that command ls .* shows all files and folders in upper directory. It is the same like I do

cd .. 
ls *

But how this achieved with one command ls .*? What is the meaning of . and * in this combination?

Score: 2
ben sunny avatar
display the filenames with 4 or more characters using ls
sd flag

How to display the filenames with 4 or more characters using the ls command

Score: -2
Packages and meaning of gcc-8
us flag

ls -la commands below brings file information gcc-8 that looks strange for me. I suppose it is not link. I know there are different GCC packages with different GCC versions and it looks like I have package with GCC version 8.

How to know gcc-8 is package and not link? Where this package is located? Why other binaries does not show its packages?

ls -la /usr/bin/gcc


lrwxrwxrwx 1 root root 5  ...
Score: 0
Which file operations trigger directory modification time and date to change?
yt flag

I have a directory named IT-documentation. Using ls -l in the terminal at its parent directory level yields (among numerous other lines)

drwxr-xr-x 16 robin robin 4096 Oct 31 08:02 IT-documentation

Now I say cd IT-documentation, then repeat ls -l. Among the numerous other lines this yields is

drwxr-xr-x  2 robin robin 4096 Nov  1 10:00 'How Tos'

On November 1 a file was in fact added to the subdir ...

Score: 0
Moez Ben Rebah avatar
Accidently make ls colors (folders, files, links...) to white
jp flag

enter image description hereI accidentally delete/change LS colors when listing directories with the 'ls' command, so I tried the command "ls --color=auto" it works temporarily because when I reboot my terminal ls colors return to just white.

Score: 0
skekmal avatar
How to list all ASCII files present in a directory?
mx flag

I want to list all ASCII files that are without extensions(.txt) in my present working directory(home). I started with the ls command in the terminal but i don't know what i should put in the options as i want to list files that have no extensions but only a name. How do i do it?

Score: 0
I can't create a "nordvpn" folder in /run
cn flag

As you can see on the joined picture.

1 - When I type : sudo mkdir nordvpn in /run I can create a folder "nordvpn". I type once "ls"; I can see the folder, I type a second times "ls" and the folder has disapeared.


2- When I type : sudo mkdir a in /run I can create a folder "a". I type once "ls"; I can see the folder, I type a second times "ls" and the folder is still there.

screen capure of th ...

Score: 0
svyslf avatar
Why do `ls -1 filename` just lists the filename?
cx flag

When I run ls -1 filename, it just lists the filename, instead of permissions with filename. However, according to online resources, the output should also have permissions details of the file. I used stat and that worked.

Score: 1
vitoruser avatar
ls (list) not showing all the files
us flag

A few days ago I was trying to see a few files in a directory after trying the ls command, and noticed some of them were missing. After retrying the command all files showed up. However this same issue happened again (see anti_pd1_pt9.sam, showing up on the second ls, but not in the first, last line)

It apparently knows there is something there (because of the size of the directory is the same in all li ...

Score: -1
Mani Kazemi avatar
What is the difference between -l and -lt
ag flag

I tried the command "ls -l" and "ls -lt" in the same directory, But it shows me the same output. Do they have any difference?

Score: 3
Leo avatar
Real time file sizes?
cn flag

In order to take a look at the sizes of my VM disk images, I tried ls -lh (as it was suggested here). And here is what it returned:

leo@ubuntu:~$ sudo ls -lh /var/lib/libvirt/images

total 65G
-rw------- 1 root root  26G Jul 21 15:20 a.qcow2
-rw------- 1 root root 801G Jul 21 10:44 b.qcow2
-rw------- 1 root root 401G Jul 21 11:42 c.qcow2

I found the output surprizing for two reasons:

  1. It appears t ...
Score: -1
CIsForCookies avatar
why `ls -d .` does not list all dirs, as `ls -d */` does?
us flag

Like it says in the heading, I don't get why the "correct" usage of ls -d should add */ in order for ls to find the directories in my current dir, where adding the trivial . isn't helpful

Score: 3
user216 avatar
broke my 'ls' command (and few more)
in flag

This is how my ls command looks like now in htop:

Also, when I try to run ls (or gimp or libreoffice) I get running stegsolve app that I can't reinstall (even found stegsolve binaries).

$ cat /etc/os-release
VERSION="20.04.2 LTS (Focal Fossa)"
PRETTY_NAME="Ubuntu 20.04.2 LTS"
SUPPORT_URL="https://help.ubu ...