Answers for "list all files in directory bash"

9

linux list directories

ls -d */
Posted by: Guest on June-15-2020
1

bash how to print the list of files in a directory

# Basic syntax:
ls /path/to/directory/

# Example usage 1:
ls /path/to/directory/ > output_file.txt # Write the files to an output
# Example usage 2:
ls /path/to/directory/ | grep *.txt > output_file.txt # Write the subset
# of files that match the grep search (e.g. end in .txt)
Posted by: Guest on September-09-2020
1

list all files in a directory and subdirectory linux

find . -type f -follow -print
Posted by: Guest on May-02-2020

Code answers related to "list all files in directory bash"

Browse Popular Code Answers by Language