Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
2 answers
204 views

Effect of slash (/) suffixes on symlink names for `ls` with the `-F` option

By way of example, I have a directory structure like this: $ \ls -F dir/ lnk@ $ \ls -F dir FILE $ \ls -l lnk lrwxrwxrwx 1 user group d Mon hh:mm lnk -> dir My ls command is aliased. I am using \...
Ana Nimbus's user avatar
0 votes
1 answer
2k views

Bash script selecting folder

I am trying to list all the directory latest modified folder first using select, but I am stuck. Let's say I have: Folder1 ThisIsAnotherDir Directory New Directory This IS not_Same Directory When I ...
KpDean's user avatar
  • 3
2 votes
3 answers
1k views

On a Mac, how can I list contents of a non-current directory without showing backup files (ending with ~), preferably with BSD command ls?

My system: OS: MacOS / Mac OS X (Mojave 10.14.5) OS core: Darwin (18.6.0) Kernel: Darwin Kernel / XNU (18.6.0 / xnu-4903.261.4~2/RELEASE_X86_64) ls: version unknown, but man ls gives a page from the ...
zeroparallax's user avatar
0 votes
1 answer
4k views

What is -- and -td options on ls command?

Could you please explain what each option on this ls command does: ls -td -- */? The result of such command would look like below: $ ls $ ls -al total 4 drwxr-xr-x 5 root root 68 Jun 4 09:58 . ...
user avatar
1 vote
2 answers
437 views

How to order several options of a command (ls)?

Why doesn't ls behave the same after exchanging the order of options -l and -f? $ ls -l -f 0821131236.jpg 0823130821.jpg $ ls -f -l total 33176 -rw-rw-r-- 1 t t 364186 Jan 6 16:06 ...
Tim's user avatar
  • 103k
0 votes
1 answer
2k views

What's the -alhF flag in ls?

What is the -alhF flag in ls? I can't find it in the man page.
user avatar
3 votes
1 answer
2k views

What does the option -C achieve in ls output?

In the man pages it says: -C list entries by columns However, I really cannot notice any difference between the output of ls or ls -C, could someone explain this to me?
Vesnog's user avatar
  • 679
16 votes
4 answers
894 views

Why does ls accept duplicate switches?

I'm curious - is there a difference between ls -l and ls -lllllllllllllllllllllllllllll? The output appears to be the same and I'm confused on why ls allows duplicate switches. Is this a standard ...
Mike B's user avatar
  • 8,980
0 votes
1 answer
1k views

wc - setting a terminating character

I've got that far: wc --files0-from=FILE lets one get the word count of a list of files. Each entry in this list mus be terminated with an ASCII NUL character. Question: A way to set a terminating ...
erch's user avatar
  • 5,060
23 votes
2 answers
47k views

syntax of ls --hide= and ls --ignore=

ls --hide and ls --ignore provides the possibility leave out files defined through regular expressions set after the --ignore= part. The latter makes sure that this option isn't turned off via -a, -A. ...
erch's user avatar
  • 5,060
52 votes
7 answers
12k views

why does ls -d also list files, and where is it documented?

when specifying ls --directory a* it should list only directories starting with a* BUT it lists files AND directories starting with a Questions: where might I find some documentation on this, other ...
erch's user avatar
  • 5,060