Basic Linux Command - Exercise

Instructions: write command sequence

Step 1: Basic commands and Listing Files

  1. Open the terminal.
  2. Check your current directory.(home directory)
  3. List all files
  4. Long list the files
  5. Clear the screen
  6. Display date and time
  7. Display the login name
  8. Display the os details
  9. Exit from the terminal
Step 2: Creating and Removing Directories
  1. Open the terminal.
  2. Check your current directory.
  3. List all files
  4. Create a folder ITWORKSHOP
  5. Change directory to ITWORKSHOP
  6. Create two folders CSA and CSB
  7. list the files
  8. Move to CSB
  9. Create an empty file
  10. Move to the parent directory(ITWORKSHOP)
  11. Use tree command to view the tree structure
  12. Remove the directories CSA and CSB ( note that you cannot remove non empty directory)
  13. Create a directory CSC
  14. Move to your home directory
  15. Recursively remove ITWORKSHOP and all its subdirectories.
  16. Exit from the terminal
Step 3: Creating, Viewing, and Removing Files
  1. Open the terminal.
  2. Check your current directory.
  3. List all files
  4. Create a folder ITWORKSHOP
  5. Move to the folder ITWORKSHOP
  6. Create an empty file f1 
  7. Create a file f2 with content "welcome to mec itworkshop"
  8. Append "hello mec" to f1
  9. Display the directory contents
  10. Display the file contents f1 and f2
  11. long list the files and check the permission, file size etc
  12. Remove f2
  13. Move to home directory
  14. Remove ITWORKSHOP and all its contents
  15. Exit from the terminal
Step 4: Copying and Moving Files
  1. Open the terminal.
  2. Check your current directory.
  3. List all files
  4. Create two directories APPLE and ORANGE
  5. Create a file f1 with content "an apple a day keeps the doctor away"
  6. Copy the file f1 to directory APPLE
  7. Change directory to APPLE
  8. List the files in the directory
  9. Rename the file f1 to a1
  10. Copy the file a1 to directory ORANGE
  11. Change the directory to ORANGE
  12. List the files in the folder
  13. Copy the file a1 to a2
  14. List the files in the folder
  15. Merge the file a1 and a2 and create a new file o1
  16. Remove a1 and a2
  17. Move o1 to home directory
  18. List the files
  19. Display the content of o1
  20. Remove o1
  21. Remove the folders APPLE and ORANGE
  22. Exit from the terminal
Step 5: Changing Permissions
  1. Open the terminal.
  2. Check your current directory.
  3. List all files
  4. Create a file f1 with content "hello mec"
  5. Long list the details of file f1
  6. Display the file f1 contents
  7. Create a link to this file with name f2
  8. Change the content of f2 by appending "cochin" to f2
  9. Display the content of f1 and f2
  10. Check the file details of f1 and f2 
  11. Set the execute permission for owner for file f1
  12. Set only execute permission for group and others for f2
  13. Check the permissions using long listing
  14. Give only read permission for others and group and give all permission for owners for both the files
  15. Check the permissions by long listing f1 and f2
  16. Remove f1 and f2
  17. Exit from the terminal

Comments

Popular posts from this blog

IT Workshop GXESL208 KTU BTech 2024 Scheme - Dr Binu V P

Familiarization of basic Linux Commands- ls, mkdir, rmdir , rm, cat, cp, mv , chmod