Versions Compared

Key

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

...

Code Block
[intro_to_linux]$ find . -name "hello“hello"

[intro_to_linux]$ find . -name "hello.*"
./data/2021/Nov/hello.txt

[intro_to_linux]$ find . -iname "hello.*"
./data/2021/Nov/hello.txt
./data/2022/Hello.csv
./data/2023/Mar/HELLO.txt

...

Code Block
[intro_to_linux]$ find . -name "tx"

[intro_to_linux]$ find . -name "*tx*"
./data/2021/README.txt
./data/2021/Nov/20211115.txt
./data/2021/Nov/hello.txt
./data/2021/Nov/20211114.txt
…
[intro_to_linux]$ find . -name "*tx"
./data/dd.tx
./data/2021/feb/february_01_2021.tx
./data/2023/Jan/texttx
[intro_to_linux]$ find . -name "*.tx"
./data/dd.tx
./data/2021/feb/february_01_2021.tx

...

Answers (4)

Code Blockinfo
#

Notice: dd.tx

is

actually

a

folder. # Notices the ’d’ in the long format list.

folder, defined by the ’d’ in the long format list.

Code Block
[intro_to_linux]$ ls -l data
total 4
drwxrwxr-x 6 arcc-t05 arcc-t05<username> <username> 2021
drwxrwxr-x 6 arcc-t05 arcc-t05<username> <username> 2022
drwxrwxr-x 5 arcc-t05 arcc-t05<username> <username> 2023
drwxrwxr-x 2 arcc-t05 arcc-t05<username> <username> dd.tx

[intro_to_linux]$ find . -type f -name "*.tx"
./data/2021/feb/february_01_2021.tx

# WeIf explicitlywe wantignore lowercase.case:
[intro_to_linux]$ find . -type f -iname "*.tx"
./data/2021/feb/february_01_2021.tx
./data/2022/20220723.TX

...