Hello, there:
I'm now learning command line from scratch on FreeBSD, and now there's a problem relating to "find" confusing me. In "find" manual, it introduces the "-f" option with following description:
However, there's no further guide and example for that. I tried it myself with these output:
So, could you help me, please? Thank you in advance.
I'm now learning command line from scratch on FreeBSD, and now there's a problem relating to "find" confusing me. In "find" manual, it introduces the "-f" option with following description:
Code:
-f Specify a file hierarchy for find to traverse. File hierarchies
may also be specified as the operands immediately following the
options.
However, there's no further guide and example for that. I tried it myself with these output:
Code:
[color="DarkGreen"]justin@zust.pts/0 ~ %[/color] ls test/mydoc/myfile/
myfile mytime myway
[color="#006400"]justin@zust.pts/0 ~ %[/color] find test/mydoc/myfile/ -type f -iname "*way*"
test/mydoc/myfile/myway
[color="#006400"]justin@zust.pts/0 ~ %[/color] find -f ~/test/mydoc/myfile -type f -iname "*way*"
find: illegal option -- t
find: illegal option -- y
find: illegal option -- p
find: illegal option -- e
/home/justin/test/mydoc/myfile/myway
[color="Red"]find: f: No such file or directory[/color]
[color="#006400"]justin@zust.pts/0 ~ %[/color] find -f ~/test/ mydoc/myfile -type f -iname "*way*"
/home/justin/test/mydoc/myfile/myway
[color="#ff0000"]find: mydoc/myfile: No such file or directory[/color]
[color="#006400"]justin@zust.pts/0 ~ %[/color] find -f ~ /test/mydoc/myfile -type f -iname "*way*"
/home/justin/Art/music/Secret Garden/Always There.mp3
/home/justin/Download/11.A Thousand Miles Away.mp3
/home/justin/Download/12.Gifts Along The Way.mp3
/home/justin/Download/14.Always Near.mp3
/home/justin/Personal_University/其它/The_Open_Source_Way.pdf
/home/justin/.goldendict/WyabdcRealPeopleTTS/a/always.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/a/anyway.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/a/away.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/b/breezeway.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/d/doorway.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/f/freeway.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/g/gangway.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/g/gateway.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/h/hallway.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/h/headway.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/h/highway.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/l/leeway.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/m/motorway.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/r/railway.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/r/roadway.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/s/sideways.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/s/slantways.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/s/stairway.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/s/stowaway.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/s/subway.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/s/sway.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/w/way.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/w/waylaid.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/w/waylay.wav
/home/justin/.goldendict/WyabdcRealPeopleTTS/w/wayward.wav
/home/justin/.lyrics/Always There.lrc
/home/justin/.icons/Macbuntu-Icons/status/24/user-away.png
/home/justin/.icons/Macbuntu-Icons/status/24/user-away-panel.png
/home/justin/.icons/Macbuntu-Icons/status/24/empathy-away.png
/home/justin/.icons/Macbuntu-Icons/status/24/empathy-extended-away.png
/home/justin/.icons/Macbuntu-Icons/status/22/user-away.png
/home/justin/.icons/Macbuntu-Icons/status/22/user-away-panel.png
/home/justin/.icons/Macbuntu-Icons/status/22/empathy-away.png
/home/justin/.icons/Macbuntu-Icons/status/22/empathy-extended-away.png
/home/justin/.icons/Macbuntu-Icons/status/16/user-away.png
/home/justin/.icons/Macbuntu-Icons/status/16/user-away-panel.png
/home/justin/.icons/Macbuntu-Icons/status/16/empathy-away.png
/home/justin/.icons/Macbuntu-Icons/status/16/empathy-extended-away.png
/home/justin/.icons/Macbuntu-Icons/apps/scalable/kopete_some_away.png
/home/justin/.icons/Macbuntu-Icons/apps/scalable/kopete_all_away.png
/home/justin/test/mydoc/myfile/myway
[color="#ff0000"]find: /test/mydoc/myfile: No such file or directory[/color]
So, could you help me, please? Thank you in advance.