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
  • 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...

  • 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...

  • LINUX QUESTIONS (dont have to display output, I will be running these commands myself to check...

    LINUX QUESTIONS (dont have to display output, I will be running these commands myself to check the output) Display the command(s) used to do the following: create an empty file called history by using just a redirection operator. Verify and show. Show/verify all results (i.e., all commands and their corresponding outputs). Wait 1 minute or more and then display the command(s) used to do the following: change the timestamp on the history file you just created. Verify/display the change. Show/verify...

  • Project 4-3: In the following steps, you will learn more about the PING (Packet Internet Grouper)...

    Project 4-3: In the following steps, you will learn more about the PING (Packet Internet Grouper) utility, which can be used on a network running IPv4 to verify that TCP/IP is configured correctly and communicating with the network. A ping test is typically the first thing network professionals try when troubleshooting a TCP/IP connection problem. For this project, you can use any type of workstation that's running TCP/IPv4, preferably one connected to the Internet. The output described in the following...

  • Edit a C program based on the surface code(which is after the question's instruction.) that will...

    Edit a C program based on the surface code(which is after the question's instruction.) that will implement a customer waiting list that might be used by a restaurant. Use the base code to finish the project. When people want to be seated in the restaurant, they give their name and group size to the host/hostess and then wait until those in front of them have been seated. The program must use a linked list to implement the queue-like data structure....

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
ADVERTISEMENT