ls Questions

4

Solved

On macOS 13.2, in zsh, ls returns the following error message: dyld[15164]: Library not loaded: /usr/local/opt/libgit2/lib/libgit2.1.6.dylib Referenced from: <14346135-E664-31AF-A80B-05A5335ED5...
Hamo asked 13/2, 2024 at 11:56

8

Solved

I wonder how to list the content of a tar file only down to some level? I understand tar tvf mytar.tar will list all files, but sometimes I would like to only see directories down to some level. ...
Groome asked 23/4, 2010 at 16:36

10

Solved

'ls' is not recognized as an internal or external command, operable program or batch file. I get this error when I try to glance at the files of my folder. cmd opened regularly(not as an admin). ...
Philosophism asked 28/2, 2018 at 15:4

4

Solved

I used the following command: aws s3 ls s3://mybucket/mydir --recursive > bigfile The resulting file was too huge (9.5MB) to conveniently work with, since I need to eyeball the info I'm look...
Edgy asked 24/1, 2019 at 21:17

29

Solved

I am writing a shell script that takes file paths as input. For this reason, I need to generate recursive file listings with full paths. For example, the file bar has the path: /home/ken/foo/bar ...
Adze asked 29/10, 2008 at 9:24

15

Solved

ls /home/user/new/*.txt prints all txt files in that directory. However it prints the output as follows: [me@comp]$ ls /home/user/new/*.txt /home/user/new/file1.txt /home/user/new/file2.txt /home/...
Geraldine asked 15/12, 2011 at 10:41

4

Solved

Running bash commands in cygwin produce the following error: $ ls ls: command not found This is a question that I self-answered on my tech blog where I keep the tech-tips which I need to give to m...
Kwok asked 10/2, 2013 at 11:25

6

Using an ls –a and grep, how would you list the name of all of the files in /usr starting with the letter p or the letter r or the letter s using a single grep command? would this be right? ls –...
Topper asked 28/5, 2015 at 18:56

4

Solved

array=${ls -d */} echo ${array[@]} I have three directories: ww ee qq. I want them in an array and then print the array.
Amadoamador asked 19/9, 2013 at 1:40

15

Solved

Can you sort an ls listing by name?
Salverform asked 18/5, 2009 at 15:16

8

I am new to linux. I have a directory in linux with approx 250,000 files I need to find count of number of files matching a pattern. I tried using following command : ls -1 20061101-20131101_kh5x...
Barris asked 15/1, 2014 at 16:35

8

Solved

I'm using msysgit (1.7.9), and I'm looking for the right invocation of the git ls-files command to show just the (tracked) files and directories at the current level, either from the index, or the ...
Flintlock asked 4/5, 2012 at 16:50

3

Solved

Is there a reason why find . -mindepth 1 -maxdepth 1 | wc -l is suggested against ls -1 | wc -l (or vice-versa ?) to count the total number of files/directories inside a folder Notes: Th...
Etherege asked 10/5, 2016 at 3:28

12

Solved

I am using AWS CLI to list the files in an AWS S3 bucket using the following command (aws s3 ls): aws s3 ls s3://mybucket --recursive --human-readable --summarize This command gives me the followi...
Drowse asked 23/4, 2016 at 16:23

7

Solved

When I am using wildcards with ls command, it works. $ ls '*.{mp3,ogg}' # Showing only two formats in the command cannot access *.mp3: No such file or directory 1.ogg 2.ogg 3.ogg but using find ...
Martins asked 13/8, 2012 at 5:4

3

I created 3 files in a directory with the following names: 11 13 9 Problem, as I created file 9 after 13 it is placed after file 13 when I do the ls command. Do you have any idea to make the ls...
ls
Vanderpool asked 16/9, 2016 at 10:22

8

Solved

I want to do something like ls -t but also have the files in subdirectories included. But the problem is that I don't want the output formated like ls -R does, which is like this: [test]$ ls -Rt b...
Bruner asked 5/2, 2011 at 21:23

5

I am trying to replicate the AWS CLI ls command to recursively list files in an AWS S3 bucket. For example, I would use the following command to recursively list all of the files in the "location2"...
Readability asked 1/5, 2016 at 20:7

3

Solved

see i am working in one BIG project source code Now i want to know which files are modified after some date. Is there any command or any way to get that.. i have tried # ls -R -l but here i...
Setup asked 24/1, 2012 at 11:24

4

Solved

Using awscli in git bash, the command aws s3 ls "s3://directory/" returns a list of PRE "filename" This is inconvenient as I need to do further commands on the output and I only need the fil...
Breuer asked 30/6, 2017 at 11:16

3

Solved

I wanted to know which system call is used in linux by the ls command to display the folder's (or file's name)? Especially the files/folders starting with "." (dot) I executed the strace ls -a com...
Abdul asked 16/10, 2012 at 18:19

7

Solved

I know ls -t will list all files by modified time. But how can I limit these results to only the last n files?
Bali asked 28/3, 2013 at 20:17

8

Solved

I'm using ls -a command to get the file names in a directory, but the output is in a single line. Like this: . .. .bash_history .ssh updater_error_log.txt I need a built-in alternative to get ...
Josh asked 7/10, 2010 at 22:21

6

Solved

I am using ls -l -t to get a list of files in a directory ordered by time. I would like to limit the search result to the top 2 files in the list. Is this possible? I've tried with grep and I str...
Bengurion asked 9/5, 2012 at 16:21

29

Solved

This command lists directories in the current path: ls -d */ What exactly does the pattern */ do? And how can we give the absolute path in the above command (e.g. ls -d /home/alice/Documents...
Panther asked 16/1, 2013 at 6:7

© 2022 - 2025 — McMap. All rights reserved.