ls

Where do I find documentation for the output of ls -l?

Where do I find documentation for the output of ls -l? There have been multiple questions asked about this, like Understanding ls output, What are columns in ls -la?, What does ‘ls -la’ do?, What do the fields in ls -al output mean?, etc.. I’ve also come across many other websites with articles attempting to …

Total answers: 2

ls output display a file named "N'*" as "N'''*"

ls output display a file named "N'*" as "N'''*" System: Ubuntu 22.04.3 LTS GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu) ls (GNU coreutils) 8.32 Situation: $ touch "N’*" $ ls ‘N”’*’ "GNU Coreutils – Quoting File names" states: “Files with single quotes are printed in a ridiculous way!” This issue was quickly fixed in version 8.26: $ …

Total answers: 1

Difference between non-graphic characters and non-printable characters

Difference between non-graphic characters and non-printable characters My system: Ubuntu 22.04.3 LTS GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu) man ls describes -b as follows: -b, –escape print C-style escapes for nongraphic characters The Wikipedia page for "control character" states: a control character or non-printing character (NPC) is a code point in a character set that does …

Total answers: 2

Why is a filename surrounded by double quotes with single quotes around a character when displayed in terminal?

Why is a filename surrounded by double quotes with single quotes around a character when displayed in terminal? Why would a file show up surrounded by double quotes with a character surrounded by single quotes within it? "insight_automation.log’.’2024-03-13" I am using Ubuntu Server 22.04.3 LTS. A service desk management program (Atlassian Jira Data Center 9.12.4 …

Total answers: 1

How does the d option for the ls command exactly work?

How does the d option for the ls command exactly work? Having the following simple structure: project main aaa aaa test ddd ddd pom.xml <— unique regular file If the current directory is project and if is executed the ls command appears main pom.xml test Until here all is OK. Now, according with man ls …

Total answers: 3

What is the /usr/bin/dir binary on linux?

What is the /usr/bin/dir binary on linux? I noticed I have a /usr/bin/dir which mostly behaves like /usr/bin/ls. I assumed first it was a convenience for people coming from DOS/Windows. I assumed this would just be a softlink to ls, but my first surprise was that this is a separate binary: $ ls -la /usr/bin/dir …

Total answers: 1

Issue with touch -t command when setting specific dates

Issue with touch -t command when setting specific dates I’m encountering an issue when using the touch -t command in the terminal. My goal is to adjust the access and modification dates of a file named "testShell00" to a specific date in the format MMDDhhmm[.ss]. However, I’m getting unexpected results. Here are some examples of …

Total answers: 2

Display the results in an alphabetical order, independently of their case

Display the results in an alphabetical order, independently of their case I am using ls on MacOS 11.6.1. In the output, the Upper cases are displayed before the lower case. For example, I get the following output: $ ls Blabla.txt GAGAS.txt asdf.txt blabla.txt and would like to have instead: $ ls asdf.txt blabla.txt Blabla.txt GAGAS.txt …

Total answers: 1

Why is ls sorting Chinese filenames by length?

Why is ls sorting Chinese filenames by length? I’ve run into a bit of a weird behaviour that I don’t fully understand with ls and Chinese filenames. I’m running macOS 13.6.1 with SIP enabled (no core OS modifications), MacPorts installed, and US English as the primary language. First, run this little script in a blank …

Total answers: 2

Thunar and ls different file size

Thunar and ls different file size I have a complete android userdata partition image on disk and it shows 48.9 GiB on Thunar but only 3.8 GB in ls and Baobab. How is it possible ? Thanks Asked By: darkon11 || Source This might be a sparse file; i.e. a file that has "holes" where …

Total answers: 1

"ls" counterpart to "find" operator "-printf"?

"ls" counterpart to "find" operator "-printf"? The find command has a handy -printf operator that prints user-specified metadata for each found file/folder. Is there such an option for the ls command? As an alternative, I can feed the list of filenames of interest to find instead of ls, but it seems like using a sledgehammer …

Total answers: 1

Get total Git LFS size

Get total Git LFS size How can I get total size of Git LFS files? I can get a listing of LFS files with git lfs ls-files –size: b1d5dd29dd – file1.zip (1.42 GB) 27d3073f43 – file2.zip (120 MB) cacd6dbfe3 – folder/file3.zip (110.2 MB) 295442cd34 – "folder/(120 MB).zip" (110.2 MB) 680bb2ab19 * test.txt (5 B) Note: …

Total answers: 1

How does `ls` find hard links?

How does `ls` find hard links? Setup The following sequence of commands is setup for my question. root@cd330f76096d:/# cd root@cd330f76096d:~# ls root@cd330f76096d:~# mkdir -p my_dir/my_subdir root@cd330f76096d:~# ls -hAil total 12K 6175969 -rw-r–r– 1 root root 3.1K Oct 15 2021 .bashrc 6175970 -rw-r–r– 1 root root 161 Jul 9 2019 .profile 7382820 drwxr-xr-x 3 root root …

Total answers: 1

How do I reliably capture the output of `ls` in this script?

How do I reliably capture the output of `ls` in this script? The following script, play_movie.sh is meant to automatically select a movie if there is only one in the current directory and play it with ffplay. Otherwise it is meant to display a selection of films to the user and take input from them …

Total answers: 2

Is it now safe to parse the output of GNU ls?

Is it now safe to parse the output of GNU ls? The accepted wisdom for the past few decades has been that it is never a good idea to parse the output of ls ([1],[2]). For example, if I want to save a file’s modification date along with its name into a shell variable, this …

Total answers: 3

ubuntu command not working

Ubuntu commands aren't working My Ubuntu seems a bit weird. cd and mkdir work fine, but instructions other than ls and rm do not. I’m not sure what the problem is. Isn’t there another way to initialize this path? I have solved the problem where the terminal was not working before, but this time the …

Total answers: 2

Effect of dircolors

Effect of dircolors What does dircolors affect. Is it for the ls command only ? Should dircolors be called before defining alias ls=’ls –color’? Asked By: Hovlar || Source dircolors outputs code meant to be interpreted by a shell. Without option or with the -b option, that’s meant for Bourne-like shells such as ksh, zsh …

Total answers: 1