Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
minLevel1
maxLevel1
outlinefalse
stylenone
typelist
printabletrue

...

Searching for Files:

...

Let us look at a folder with many subfolders and files.

Code Block
[]$ cd ~/intro_to_linux
[intro_to_linux]$ ls
clusters  data  software.csv
[intro_to_linux]$ ls -R
.:
clusters  data  Intro_to_linux.pdf  software.csv  vegatables.txt  workshop_all.txt  workshop_me.txt
./clusters:
beartooth.html  loren.html  teton.html  wildiris.html
./data:
2021  2022  2023  dd.tx
./data/2021:
Apr  Nov  Sep
./data/2021/Apr:
20210403.txt  20210427.txt  20210428.txt

...

Searching for Files: find

Code Block
./data/2021/Nov:
20211114.txt  20211115.txt  20211116.txt  hello.txt
./data/2021/Sep:
20210908.txt  20210921.txt
./data/2022:
Dec  Feb  Hello.csv  Jul  Jun
./data/2022/Dec:
20221207.txt  20221220.txt  20221230.txt  20221231.txt
./data/2022/Feb:
20220203.txt  20220223.txt
./data/2022/Jul:
20220720.txt  20220722.txt  20220723.TX
...

...

Searching for Files: find

Command

Description

find

Code Block
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
default path is the current directory; default expression is -print
expression may consist of: operators, options, tests, and actions:
...
EXPRESSION
       The  part  of the command line after the list of starting points is the expression.  This is a
       kind of query specification describing how we match files and what we do
...
  TESTS
    ...
    -name pattern
      Base of file name (the path with the leading directories removed) matches shell pattern pattern.
    ...
    -iname pattern
       Like -name, but the match is case insensitive.
    ...

...