shelllings

a practical way to learn shell
Log | Files | Refs | README | LICENSE

03_listing.sh (818B)


      1 #!/bin/sh
      2 
      3 # In the folder you are in, you can list the folder contents by typing
      4 # 'ls' and seeing what is there. Some shell configs will have the 
      5 # folders bold and different colored to help with navigation.
      6 # 
      7 # $ ls      # lists contents
      8 # $ ls -a   # lists hidden contents as well as unhidden
      9 # $ ls -A   # same as -a but without . and ..
     10 #             Also, not entirely POSIX compliant but many modern shells
     11 #             run it fine
     12 # $ ls -l   # shows linkages in files, like how we did with 
     13 #             ls -l /bin/sh
     14 # $ ls -R   # recursively goes into folders listing contents out
     15 # $ ls -AR  # separate arguments can be combined to execute both
     16 #
     17 # For your exercise, a random file will be created and hidden. Find
     18 # the file and delete it.
     19 
     20 rm file_name # rm means to remove, do not change that part