zeus
4 years ago
9 changed files with 24758 additions and 1 deletions
@ -0,0 +1 @@ |
|||||
|
find /usr -name "*.h" | head -5 |
@ -0,0 +1 @@ |
|||||
|
find /usr -name "*.conf" | grep python |
@ -0,0 +1,12 @@ |
|||||
|
In Linux and other UNIX-like operating systems, each process has a standard input (*stdin*) and a standard output (*stdout*). The usual situation is that _stdin_ is your keyboard and _stdout_ is your screen or terminal window. |
||||
|
|
||||
|
So when you run *find*, it will throw it's output to _stdout_. If you do nothing else, it will go to your screen or terminal window, and you will view it. |
||||
|
|
||||
|
if we do this: |
||||
|
|
||||
|
[source,bash] |
||||
|
---- |
||||
|
find /usr -name "*.h" | grep "md5" |
||||
|
---- |
||||
|
|
||||
|
the "*pipe*" connects the _stdout_ of one command to the _stdin_ of another. |
File diff suppressed because it is too large
@ -0,0 +1,6 @@ |
|||||
|
Find Files by Name |
||||
|
|
||||
|
[source.sh] |
||||
|
---- |
||||
|
find /usr -name "*.h" | head -5 |
||||
|
---- |
@ -0,0 +1,9 @@ |
|||||
|
|
||||
|
Try to run |
||||
|
|
||||
|
[source,sh] |
||||
|
---- |
||||
|
find /usr -name "*.h" | grep "md5" |
||||
|
---- |
||||
|
|
||||
|
and see the Results! |
@ -0,0 +1,7 @@ |
|||||
|
Find command is one of the most useful & important command used in Linux. |
||||
|
|
||||
|
The *find* command is available on most linux distros by default so you do not have to install any package. |
||||
|
|
||||
|
Find can be used in a variety of conditions like you can find files by *permissions, users, groups, file type, date, size, and other possible criteria.* |
||||
|
|
||||
|
In this *LO*, we will see the most used Find Commands examples in Linux. |
@ -0,0 +1,28 @@ |
|||||
|
--- # Programming language |
||||
|
name: "grep" |
||||
|
base_url: "https://git.swarmlab.io:3000/llo/LabLearningObject/raw/branch/master" |
||||
|
author: "zeus" |
||||
|
intro: "intro" |
||||
|
0_Case_insensitive_search: |
||||
|
display_name: "Find_basic_search" |
||||
|
swarmlabservice: "os2" |
||||
|
info: |
||||
|
file: "0_Case_insensitive_search/info" |
||||
|
code: |
||||
|
lang: "bash" |
||||
|
exec: "/bin/bash" |
||||
|
file: "0_Find_basic_search/code" |
||||
|
data: "0_Find_basic_search/data" |
||||
|
options: "" |
||||
|
mimetype: "bash" |
||||
|
output: |
||||
|
log: "console" |
||||
|
mimetype: "bash" |
||||
|
challenge: |
||||
|
question: "0_Find_basic_search/q-info" |
||||
|
codehelp: "0_Find_basic_search/codehelp" |
||||
|
codeanswer: "0_Find_basic_search/codeanswer" |
||||
|
mimetype: "bash" |
||||
|
points: "" # ELO |
||||
|
output: |
||||
|
log: "bash" |
Loading…
Reference in new issue