Questions tagged [ls]

A utility in Unix-like systems such as Linux used for listing files and directories.

A utility in Unix and Unix-like operating systems used for listing files and directories. It is analogous to the dir command used in DOS and Windows.

Documentation

1314 questions
-4
votes
1 answer

Bash ls command not working in shell script

I'm writing a shell script, and it also has to check if a file with a certain extension exists in a different directory. I'm running an ls command like this: TEMPLATE_FOLDER="$HOME/Downloads/" # Folder to check file="py" # Extension…
Hussein Esmail
  • 353
  • 5
  • 21
-4
votes
1 answer

bash scripting - what does "ls .." (ls with double dot) do?

My homework asked me to find what ls .. does. I tried to search the internet but I couldn't find any answer to the question. Does someone know what this command does?
omersk
  • 109
  • 1
  • 10
-4
votes
1 answer

matching the ls command output

I'm trying to code the ls command. I have the following function that prints each file name : int ft_list(const char *filename) { DIR *dirp; struct dirent *dir; if (!(dirp = opendir(filename))) return (-1); while ((dir =…
E.Ayman
  • 43
  • 8
-4
votes
1 answer

ls command for searching specific files in current directory

How to use ls command for searching specific files in current directory. Let's say where file name contains "localhost".
user1934643
  • 165
  • 1
  • 10
-5
votes
1 answer

The output of ls with -aF option is not clear

When I try the command ls with -aF option inside any directory whether it's empty or not, I always got the following: ./ ../ so what does the output mean when I have these two options together with ls command?
redRose
  • 83
  • 1
  • 3
  • 10
-5
votes
4 answers

Why ls | grep * isn't displaying anything?

if i do ls the output is: but if i do ls | grep complex* or ll | grep complex* or even ll | grep * or ll | grep * | less the output is always: This is confusing to me. I want to get a list of all files that start with complex* FYI if '*' ==…
hungryWolf
  • 391
  • 1
  • 3
  • 15
-5
votes
2 answers

ls and ls -la not displaying a file that I am trying to compile (Java)

ls and ls -la commands are not displaying files that I want to compile. Why are my files not showing up?
-5
votes
1 answer

List files missing a corresponding file

I have a directory with about 1500 files. Each of these files have a corresponding .txt file of the same name to go along with it. Some of these files are missing the txt files so I need to re-create or re-download them. I need to find a way to list…
-5
votes
1 answer

What is the address from which /bin/ls program execution starts?

I need to know what's the address from which /bin/ls program execution starts (after dynamic linker fix the environment, what address gets the control?) I need it in hexadecimal (0xNNN...) or decimal format
wooden
  • 123
  • 1
  • 8
1 2 3
87
88