zeus 4 years ago
parent
commit
cd750682c4
  1. 23
      index_ls.yml
  2. 26
      ls/1_ls_with_options/code
  3. 1
      ls/1_ls_with_options/codeanswer
  4. 0
      ls/1_ls_with_options/codehelp
  5. 24692
      ls/1_ls_with_options/data
  6. 41
      ls/1_ls_with_options/info
  7. 9
      ls/1_ls_with_options/q-info

23
index_ls.yml

@ -26,3 +26,26 @@
points: "" # ELO points: "" # ELO
output: output:
log: "bash" log: "bash"
1_ls_with_options:
display_name: "ls_with_options"
swarmlabservice: "os2"
info:
file: "1_ls_with_options/info"
code:
lang: "bash"
exec: "/bin/bash"
file: "1_ls_with_options/code"
data: "1_ls_with_options/data"
options: ""
mimetype: "bash"
output:
log: "console"
mimetype: "bash"
challenge:
question: "1_ls_with_options/q-info"
codehelp: "1_ls_with_options/codehelp"
codeanswer: "1_ls_with_options/codeanswer"
mimetype: "bash"
points: "" # ELO
output:
log: "bash"

26
ls/1_ls_with_options/code

@ -0,0 +1,26 @@
echo "List Files and Directories with ‘/’ Character at the end"
echo "-----------------------------"
ls -F /
echo ""
echo "Recursively list Sub-Directories"
echo "-----------------------------"
ls -R /
echo ""
echo "Sort Files by File Size"
echo "-----------------------------"
ls -lS /usr/share
echo ""
echo "Display UID and GID of Files"
echo "-----------------------------"
ls -n /usr/share
echo ""

1
ls/1_ls_with_options/codeanswer

@ -0,0 +1 @@
ls -al /usr/share | grep "python"

0
ls/1_ls_with_options/codehelp

24692
ls/1_ls_with_options/data

File diff suppressed because it is too large

41
ls/1_ls_with_options/info

@ -0,0 +1,41 @@
List Files with
[source,bash]
----
-h, --human-readable
with -l and -s, print sizes like 1K 234M 2G etc.
----
[source,bash]
----
ls -lh /
----
List Files and Directories with ‘/’ Character at the end
[source,bash]
----
ls -F /
----
Recursively list Sub-Directories
[source,bash]
----
ls -R /
----
Sort Files by File Size
[source,bash]
----
ls -lS /usr/share
----
Display UID and GID of Files
[source,bash]
----
ls -n /usr/share
----

9
ls/1_ls_with_options/q-info

@ -0,0 +1,9 @@
Try to run
[source,sh]
----
ls -al /usr/share | grep python
----
and see the Results!
Loading…
Cancel
Save