Skip to main content

Questions tagged [ls]

The command to list the contents of a folder/directory in Unix and Unix-like systems.

15 votes
2 answers
3k views

I am working on Debian Stable Linux, which is otherwise working very well. I am using the following command to list the files in the directory so that they are sorted and the most recently modified ...
rnso's user avatar
  • 484
5 votes
1 answer
669 views

Scenario: $ ls -1 'x y.pdf' $ ls -1 | cat x y.pdf Here we see that surrounding single quotes are missing if output of ls -1 is passed to a pipe. Why does this happen? How to keep the surrounding ...
pmor's user avatar
  • 464
0 votes
1 answer
362 views

In MSYS2 the windows c drives gets mounted to the filesystem root at /c with the command cd /c I can change into the directory. However, the directory is not visible when I run the command ls -la /. ...
Lucas's user avatar
  • 789
1 vote
0 answers
59 views

Please see the following image: enter image description here You can see that the lichess_db file is listed as 209G in ls, but du -hd1 indicates a folder size of only 196G. Why does that happen? Which ...
av06's user avatar
  • 11
1 vote
1 answer
158 views

Let's say that I'm a psychopath who names my files like: [-] `{title: "Non-Metadata", id: "s4a4ji"}`{.JSON5}.dir That's my best attempt at making the most hideous plausible ...
RokeJulianLockhart's user avatar
4 votes
1 answer
2k views

I have this folder containing only two files. If I use root and cd to that folder, ls would get stuck. However, ls runs correctly when I log in as a common user, or ls from parent folder like ls ...
leetom's user avatar
  • 175
1 vote
0 answers
1k views

I have a storage device (sda) where I stored some backups in its partition 1 (sda1). Disgracefully, I killed the process (rsync) that was backing up data into the mounted storage device and, I guess, ...
Guillem Senabre's user avatar
1 vote
1 answer
8k views

I'm basically looking for something like ls -alt, but in Powershell (Windows 11). Currently I'm using gci -fo | sort LastWriteTime -Descending but it's a bit of a doozy, and definitely not easy to ...
DeltaIV's user avatar
  • 527
0 votes
0 answers
6k views

For listing of directories I always use commands like ls -la --time-style=long-iso <directoryname> And all is at best. Yet on some cases I append a date-time suffix to the filename. This is ...
Anton Wessel's user avatar
1 vote
1 answer
201 views

When I run Ranger, it prints its standard message: loading...ranger But then hangs forever. What is the root cause?
James Madison's user avatar
0 votes
1 answer
489 views

I have files with numeric as it's file name. 10asdfsfl.txt 11sdfkf.txt 20sdfdf.txt 22sdfdf.txt 30saadf.txt 40asdfdf.txt 51sadfsf.txt 62ddgfg.txt if I use ls -l [40-50]* it returning list of files ...
snydez's user avatar
  • 5
3 votes
0 answers
244 views

I'm running msys2 on Windows 11: $ uname -a MINGW64_NT-10.0-22621 couch-potato 3.4.9.x86_64 2023-09-15 12:15 UTC x86_64 Msys And I have it configured to use my Windows home directory (/c/Users/<...
user31708's user avatar
  • 131
0 votes
1 answer
88 views

I've run ls -l command but I have got a big confusion: Ouput of ls -l in home directory: $ ls -l total 16 drwxr-x--- 19 farah farah 4096 اگست 18 18:40 farah drwxr-x--- 40 hussain hussain 4096 ...
Muhammad Hussain's user avatar
-3 votes
2 answers
3k views

I can see ls -R lists all files and folders. I can grep the file name from the list. What are the advantages of "find" ? Also, any caveats if I use ls -R instead of find?
Bijo's user avatar
  • 1
1 vote
1 answer
249 views

The behavior I'm seeking is a nested sort with the ls command where sorting by one method doesn't cancel out sorting by a second method. The exact desired behavior is essentially: First sort with ...
elucid8's user avatar
  • 88

15 30 50 per page
1
2 3 4 5
23