# List files in current folder
> ls
dir1/ dir2/ file1 file2 test.txt
# List files; -l for long format, -a for all (include system, hidden files)
> ls -la
total 0
drwxr-xr-x 1 Thu 197121 0 Jan 28 17:00 dir1/
drwxr-xr-x 1 Thu 197121 0 Jan 28 17:00 dir2/
-rw-r--r-- 1 Thu 197121 0 Jan 28 17:00 file1
-rw-r--r-- 1 Thu 197121 0 Jan 28 17:00 file2
-rw-r--r-- 1 Thu 197121 0 Jan 28 17:00 test.txt
# Find files, folder in current (.) and sub-folder matching specified name pattern
> find . -name "file*"
./file1
./file2
# Find files, match specified pattern file name, case insensitive
> find . -iname "file*"
./file1
./file2
./File3
# Use grep to filter result from other command
# grep filter output that include string "fil"
> find . | grep fil
./file1
./file2
# grep filter output that strat with string "fil" OR "dir"
> find . | grep -i "fil*\|dir*"
./dir1
./dir2
./file1
./file2
./File3
See why 4M developers consider Sentry, “not bad.”
Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)