Browse Source

find

master
zeus 4 years ago
parent
commit
d5786deb53
  1. 1
      find/0_Find_basic_search/code
  2. 1
      find/0_Find_basic_search/codeanswer
  3. 12
      find/0_Find_basic_search/codehelp
  4. 24692
      find/0_Find_basic_search/data
  5. 6
      find/0_Find_basic_search/info
  6. 9
      find/0_Find_basic_search/q-info
  7. 7
      find/intro
  8. 28
      index_find.yml
  9. 3
      index_grep.yml

1
find/0_Find_basic_search/code

@ -0,0 +1 @@
find /usr -name "*.h" | head -5

1
find/0_Find_basic_search/codeanswer

@ -0,0 +1 @@
find /usr -name "*.conf" | grep python

12
find/0_Find_basic_search/codehelp

@ -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.

24692
find/0_Find_basic_search/data

File diff suppressed because it is too large

6
find/0_Find_basic_search/info

@ -0,0 +1,6 @@
Find Files by Name
[source.sh]
----
find /usr -name "*.h" | head -5
----

9
find/0_Find_basic_search/q-info

@ -0,0 +1,9 @@
Try to run
[source,sh]
----
find /usr -name "*.h" | grep "md5"
----
and see the Results!

7
find/intro

@ -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.

28
index_find.yml

@ -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"

3
index_grep.yml

@ -4,7 +4,7 @@
author: "zeus" author: "zeus"
intro: "intro" intro: "intro"
0_Case_insensitive_search: 0_Case_insensitive_search:
display_name: "Case insensitive search" display_name: "Case_insensitive_search"
swarmlabservice: "os2" swarmlabservice: "os2"
info: info:
file: "0_Case_insensitive_search/info" file: "0_Case_insensitive_search/info"
@ -95,3 +95,4 @@
points: "3" # ELO points: "3" # ELO
output: output:
log: "bash" log: "bash"

Loading…
Cancel
Save