Imagine that you are using Ubuntu Linux. Write a list of 4 commands (i.e., one c
ID: 3602408 • Letter: I
Question
Imagine that you are using Ubuntu Linux. Write a list of 4 commands (i.e., one command per line) that would do the following tasks. (Recall that Linux commands are case sensitive, so be sure to include the correct case and spacing.) a. Go to a sub-directory (i.e., sub-folder) named Family that is under a parent directory named MyPhotos b. View the files in that sub-directory that also shows the modification date of the files c. Provide access rights so that the owner and group associated with the file Family Reunion17.ipg can be read, executed, and edited; the public has no rights to the file d. Learn more about the syntax and use of the command df (displays disk space usage)Explanation / Answer
a.change directory to Family
cd MyPhotos/Family
b.To view the files with modification date and time use below command
ls -Rl --time-style=long-iso .
c.If you want to provide access rights to group first you should create user and add
user to group.
sudo useradd -m venu -p 123
*here venu is username and 123 is password.
sudo usermod -a -G myfamily venu
*here we added user venu to myfamily group
sudo chgrp myfamily ./FamilyReunion17.jpg
*here we are adding access rights to users inside myfamily group
d.df command used to know disk size and used and available usage
df -h
*here h means human readable