linux activity get current directory
Task 3. Locate and read the contents of a file 3) Display the contents of the Q1_added_users.txt file.
cat Q1_added_users.txt What department does the employee with the username aezra work in? human resources What is the employee_id of the user mreed in the Information Technology department? 1177
Task 4. Navigate to a directory and locate a file 1)Navigate to the /home/analyst/logs directory cd /home/analyst/logs
cd /home/analyst/logs then enter
Task 2. Change directory and list the cdsubdirectories 1)Navigate to the /home/analyst/reports directory. Display the files and subdirectories in the /home/analyst/reports directory. (the command to complete this step using a relative path) cd reports
cd reports enter cd /home/analyst/reports (the cd command accepts absolute and relative paths includes all the directories from the root of the file system and starts with a / An alternative is a relative path, which is expressed starting from the current directory and starts with the intitial /. The above command uses a relative path)
Task 4. Navigate to a directory and locate a file 3)Display the first 10 lines of this file. This command will display the following output: server_logs.txt fil
head server_logs.txt enter
How many directories does the current working directory contain
logs projects reports temp analyst@b149923007ed:~$ 4
Task 4. Navigate to a directory and locate a file 2) Display the name of the file it contains. ls
ls enter
Task 2. Change directory and list the subdirectories 2 )Display the files and subdirectories in the /home/analyst/reports directory. The command to complete this task is (ls)
ls enter (What is the name of the subdirectory in the /home/analyst/reports directory?) users/ change directory and list subdirectories
Task 3. Locate and read the contents of a file 2) list the files in the current directory (ls)
ls then enter
Task 1. Get the current directory informationscenario one /Display your working directory. Display the names of the files and directories in the current working directory. step is (ls)
pwd enter then /home/analyst enter then ls