Introduction to UNIX commands part I
Contents: Understanding the directory structure of Linux and ideas of open source
Duration: 3 Hours
Important Commands:
- whoami - to extract the current user
- pwd - to extract the current working directory
- ls - to list the contents of a directory
- cd - to change the current working directory to given directory
- mkdir - to create a directory in the current working directory
- rmdir - to delete a directory
- touch - to create a file
- cat - to show the contents of a file without opening it
- head - to show few lines of the given file from the top
- tail - to show few lines of the given file from the bottom
- mv - to rename a file or move the contents to a given location
- cp - to copy the contents of a file to another file
- rm - to delete a file
Exercises
- Create a directory “courses” in the home directory using the mkdir command. Use the ls command to verify the directory creation.
- Create two subdirectories “Engineering_lab” and “Programming_lab” in the “courses” directory. Understand the ls, cd, rmdir, rm commands.
- Open the LibreOffice writer application and create a .odt document in the Engineering_lab directory and write about a Computer Scientist. Use formatting options to create headings and text wrapping. Insert the picture of the Scientist and align it.
- Create a plain text document inside the Engineering_lab directory using the touch command and copy the contents from the .odt file.
- Change the file permissions using the chmod command.
- Explore cp, mv commands and copy a file from the Engineering_lab directory to the Programming_lab directory.