Question

Project 4-4 In this hands-on project, you make and view links to files and directories. Switch to...

Project 4-4 In this hands-on project, you make and view links to files and directories.

Switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the password of secret.

At the command prompt, type cd samples and press Enter. Next, type ls -F at the command prompt and press Enter. What files do you see? Next, type ls -l at the command prompt and press Enter. What is the link count for the sample1 file?

At the command prompt, type ln sample1 hardlinksample and press Enter. Next, type ls -F at the command prompt and press Enter. Does anything in the ter- minal output indicate that sample1 and hardlinksample are hard-linked? Next, type ls -l at the command prompt and press Enter. Does anything in the terminal output indicate that sample1 and hardlinksample are hard-linked? What is the link count for sample1 and hardlinksample? Next, type ls -li at the command prompt and press Enter to view the inode numbers of each file. Do the two hard-linked files have the same inode number?

At the command prompt, type ln sample1 hardlinksample2 and press Enter. Next, type ls -l at the command prompt and press Enter. What is the link count for the files sample1, hardlinksample, and hardlinksample2? Why?

At the command prompt, type vi sample1 and press Enter. Enter a sentence of your choice into the vi editor, then save your document and quit the vi editor.

6. At the command prompt, type cat sample1 and press Enter. Next, type cat hardlinksample at the command prompt and press Enter. Next, type cat hard- linksample2 at the command prompt and press Enter. Are the contents of each file the same? Why?

7. At the command prompt, type ln –s sample2 symlinksample and press Enter. Next, type ls -F at the command prompt and press Enter. Does anything in the ter- minal output indicate that sample2 and symlinksample are symbolically linked? Which file is the target file? Next, type ls -l at the command prompt and press Enter. Does anything in the terminal output indicate that sample2 and symlinksample 4 are symbolically linked? Next, type ls -li at the command prompt and press Enter to view the inode numbers of each file. Do the two symbolically linked files have the same inode number?

8. At the command prompt, type vi symlinksample and press Enter. Enter a sentence of your choice into the vi editor, then save your document and quit the vi editor.

9. At the command prompt, type ls -l and press Enter. What is the size of the sym- linksample file compared to sample2? Why? Next, type cat sample2 at the com- mand prompt and press Enter. What are the contents and why?

10. Atthecommandprompt,typeln–s/etc/sysconfig/network-scriptsnetscripts and press Enter. Next, type ls -F at the command prompt and press Enter. What file type is indicated for netscripts? Next, type cd netscripts at the command prompt and press Enter. Type pwd at the command prompt and press Enter to view your current directory. What is your current directory? Next, type ls -F at the command prompt and press Enter. What files are listed? Next, type ls -F /etc/sysconfig/network-scripts at the command prompt and press Enter. Note that your netscripts directory is merely a pointer to the /etc/sysconfig/network- scripts directory. How can this type of linking be useful?

11. Type exit and press Enter to log out of your shell.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1. Switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the ter- minal using the user name of root and the password of LNXrocks!.

Login success.

2. At the command prompt, type touch permsample and press Enter. Next, type chmod 777 permsample at the command prompt and press Enter.

touch command is used to create empty, new files.chmod for changing the permission , there are3 classes - Owner, Group and others .3 actions we can do on any file those are - read, write execute. 777 means can do write, execute and read actions on file.
Read is 4
write is 2
Execute is 1
no permission - 0

3. At the command prompt, type ls -l and press Enter. Who has permissions to this file?

ls command is used to list the files -l opion for long listing format.Ownwer ,group and others all can access the file and can perfrm read , write and execute actions.

4. At the command prompt, type chmod 000 permsample and press Enter. Next, type
ls –l at the command prompt and press Enter. Who has permissions to this file?

chmod 000 permsample --changes the permission , 0- means no permissiones ,nobody can access the file.

5. At the command prompt, type rm –f permsample and press Enter. Were you able to
delete this file? Why?

yes able to delete this file, rm command is used to delete the file and -f option is force delete.

6. At the command prompt, type cd / and press Enter. Next, type pwd at the command prompt and press Enter. What directory are you in? Type ls –F at the command prompt and press Enter. What directories do you see?

cd is for chnage directory. pwd prints the present working directory , now am in / directory .ls -F list the directories of root ,please refere attachment for the list of directories.

Please find the screenshot

Add a comment
Know the answer?
Add Answer to:
Project 4-4 In this hands-on project, you make and view links to files and directories. Switch to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Project 3-7 In this hands-on project, you use the grep and egrep commands alongside regular ex...

    Project 3-7 In this hands-on project, you use the grep and egrep commands alongside regular ex pression metacharacters to ex plore the contents of tex t files. 1. Switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the password of LNXrocks!. 2. At the command prompt, type grep “Inn” sample1 and press Enter. What is displayed and why? 3. At the command prompt, type grep -v “Inn”...

  • In this hands-on project, you compile and install a program from source code. On your Fedora...

    In this hands-on project, you compile and install a program from source code. On your Fedora Linux virtual machine, switch to a graphical terminal (tty1) by pressingCtrl+Alt+F1 and log in to the GNOME desktop using the user name of user1 and the password of LNXrocks!. Open the Firefox Web browser and download the source code tarball for rdesktop 1.8.2 (rdesktop-1.8.2.tar.gz) from www.rdesktop.org. Save the source code tarball to the default location (/home/user1/Downloads) and log out of the GNOME desktop when...

  • 2. At the command prompt, type ls –l /dev/log and press Enter. What is the file type? Which daemo...

    2. At the command prompt, type ls –l /dev/log and press Enter. What is the file type? Which daemon on Ubuntu Server Linux uses this file and what is its purpose? 3. At the command prompt, type less /etc/rsyslog.conf and press Enter to view the configuration file for the System Log Daemon. Are there any entries that specify facilities, priorities, or log file locations? What does the last line of the file specify? Press q when finished to quit the...

  • 2. At the command prompt, type ls –l /dev/log and press Enter. What is the file...

    2. At the command prompt, type ls –l /dev/log and press Enter. What is the file type? Which daemon on Ubuntu Server Linux uses this file and what is its purpose? 3. At the command prompt, type less /etc/rsyslog.conf and press Enter to view the configuration file for the System Log Daemon. Are there any entries that specify facilities, priorities, or log file locations? What does the last line of the file specify? Press q when finished to quit the...

  • with SCREENSHOTS PLEASE Linux+ Guide to Linux Certification Project 9-4 In this hands-on project, you view...

    with SCREENSHOTS PLEASE Linux+ Guide to Linux Certification Project 9-4 In this hands-on project, you view and manage processes using the top command-line utility. 1. On your Fedora Linux virtual machine, switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the password of LNXrocks!. 2. At the command prompt, type top and press Enter. 3. From the output on the terminal screen, record the following information: a....

  • do numbers 4-8 4. Given any directory, use the Is command to display: • all files...

    do numbers 4-8 4. Given any directory, use the Is command to display: • all files and sub-directories starting with the letter "D" (note do not list anything in any sub-directory) • its immediate sub-directories (sub-directories only, and no other ordinary files) its immediate hidden sub-directories only - take a screenshot (#3-3) that clearly shows the command and the result. 5. Assume that the following files are in the working directory: $ ls intro notesb ref2 section 1 section3 section4b...

  • A filename con comprise multiple embedded dots (e.g., a.b.c.d.e). True False A device file is not...

    A filename con comprise multiple embedded dots (e.g., a.b.c.d.e). True False A device file is not really a stream of characters and doesn't contain anything at all. True False Relative pathnames begin with the root directory. True False Running the ls -a command uniquely identifies directories and binary executables. True False What is the result of running mkdir -p share/man/cat1 from the command line? a. It creates the directory share. b. It creates the directory share/man. c. It creates the...

  • Unix/Linux The purpose of this lab is to practice the commands to manage and organize files...

    Unix/Linux The purpose of this lab is to practice the commands to manage and organize files and directories: How would one go about this? Thanks. Task 1: Preliminaries: 1) If you have not already done so, create a directory called bin under your HOME directory. 2) If you have not already made a copy (using ftp) of the file called famous.dat from the Assignment#1, do that now. 3) Make bin the active/working directory. Task 2: Perform all of the following...

  • Ensure that the Choose an option screen is displayed. If it is not and you have...

    Ensure that the Choose an option screen is displayed. If it is not and you have to go back into the repair mode Click Troubleshoot in the Choose an option screen Click Command Prompt in the Advanced options screen. You’ll see a command prompt window Type dir \Windows and press Enter to view the files and subdirectories in the \Windows directory (containing system files). Type copy /? and press Enter to view the documentation for the copy command. Press the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT