Thursday, February 16, 2017

Files Mangement

My Linux Learning Path.

Do Linux to learn Linux (via exercises).

  1. In Desktop create a directory with the name: "Test".
  2. Set root the working directory. From here create two additional directories: "Data", "Shell" in "Test" directory created previously.
  3. Set root the working directory. Create 3 txt file (file1.txt, file2.txt, file3.txt) in "Data" directory. Use expansion expression to create the files.
  4. Set "~/Desktop/Test/Shell/" the working directory. Create file "set_file1.sh" and define a script inside that insert numbers from 1 to 10 in "file1.txt"
  5. Execute previous script. If problems use ls -li to identify permissions and make the necessary corrections.
  6. Set "~/Desktop/Test/" the working directory.
    • Use ls -li command to list tree of items found. Redirect the result to file2.txt using standard output channels.
    • Use ls -li command to list tree of items found. Redirect the result to file3.txt using tee command.
    • Use ls -li command to list tree of items found. Append the result to file4.txt.
  7. Set ~/Desktop/ the working directory. Use ls and grep command (with pipe) to identify files with extension: txt.
  8. Repeat previous exercise but this time sort the output by file name in reverse order.
  9. Repeat previous exercise but this time use tee command to copy the output to files: file_list1.txt, file_list2.txt.
  10. Use cat, less and pipe to identify the first 25 commands that appears in $HISTFILE.
  11. Identify the last 15 command that appears in $HISTFILE.Print them in the screen and save it in a txt file.
  12. ls -lc sort the result by filename. Use ls -li and sort command to achieve the same result.
  13. ls -lt sort the result by time modification (according to man ls). Use ls -li and sort command and order the file by month, date, hour.
  14. Create a file Students.doc (use vim) with the following information:
    Javier; Mauricio; 34
    Alvaro; Raga; 54
    Elizabeth; Alvarez; 35
    Sandra; Alvarez; 35
    Luz; Osorio; 62
    Sandra; Lopez; 21
    Next, identify:
    • Sort data by first column.
    • Sort Data by first and second column
    • Create a document that contains columns 1 and 3 only.
    • Create a document that contains columns 2 and 3 only, and change separator to ;.

No comments:

Post a Comment