- Copy All Files from One Folder to Another
- Listing Files
- Find a File by Its Filename in a Directory
- List files with it's filesize
cp -r /source_dir/* /destination_dir/
To copy also hidden files (like .env, .gitignore):
cp -r /source_dir/{*,.*} /destination_dir/
The ls
command in Linux is used to list directory contents. You can sort the output of ls
in various ways by using different options.
- By Modification Time (newest first):
ls -lt
- By Size (largest first):
ls -lS
Basic Syntax
find /path/to/directory -name "*part_of_name*"
find /path/to/directory -name "*log*"
find /path/to/directory -type f -name "index*" \
-not -path "*/vendor/*" \
-not -path "*/node_modules/*"
ls -lh