Question

Assume you have a file "animal.c". You type ln -s animal.c penguin.c in order to create...

Assume you have a file "animal.c". You type ln -s animal.c penguin.c in order to create file "penguin.c". If you rename "animal.c" to "animal-base.c", what happens when you try to edit "penguin.c"? Why?

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

The ln -s command basically creates a symbolic link to the original file.. Hence once you rename the original file, the link still remains there (the link is created on the file Id in backend, Not on name, So on renaming the file, the link still remain there.)

Now, When you edit the file using the link penguin.c, The original file is modified, because it is linked.. The above snapshot shows that on editing using the link, The original file's content get changed..

Add a comment
Know the answer?
Add Answer to:
Assume you have a file "animal.c". You type ln -s animal.c penguin.c in order to create...
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
  • IS Chapter 10 homework Help

    EX16_XL_CH10_GRADER_ML2_HW - Animal Shelter 1.6 Project Description:You manage a small animal shelter in Dayton, Ohio. Your assistant created an XML document that lists some of the recent small animals that your shelter took in. In particular, the XML document lists the animal type (such as cat); the age, sex, name, color, and date the animal was brought in; and the date the animal was adopted. You want to manage the data in an Excel worksheet, so you will create a link...

  • [2] What happens when you try to create a hard link to a directory? [2] Create...

    [2] What happens when you try to create a hard link to a directory? [2] Create a new directory. In the new directory, create a new file. In the new directory, create a symbolic link to the new file with its relative path. Test that the link is really working by 'cat'ing the symbolic link. Use the mv command to move the symbolic link to another directory (either the parent or a new subdirectory. Will the symbolic link still work?...

  • EX16_XL_CH10_GRADER_ML2_HW - Animal Shelter 1.5 Project Description: You manage a small animal shelter in Dayton, Ohio....

    EX16_XL_CH10_GRADER_ML2_HW - Animal Shelter 1.5 Project Description: You manage a small animal shelter in Dayton, Ohio. Your assistant created an XML document that lists some of the recent small animals that your shelter took in. In particular, the XML document lists the animal type (such as cat); the age, sex, name, color, and date the animal was brought in; and the date the animal was adopted. You want to manage the data in an Excel worksheet, so you will create...

  • How to create a file using Formatter? What happens if you exit the program without closing...

    How to create a file using Formatter? What happens if you exit the program without closing it? What will happen if you are trying to write file onto a read only location? What will happen if you write to a file that has been closed? This question is related to Java programming. Please type answers. No screenshot of poorly written handwriting.

  • you have logged in a cisco router, considering the prompt below type the command(s) in order...

    you have logged in a cisco router, considering the prompt below type the command(s) in order to let the router accept incoming telnet request. we'd like create 4 telnet connections.Also set the password for telnet to be TELNET. Router(config)#

  • Completion is a screenshot of the batch file showing all of the steps to create the file system s...

    Completion is a screenshot of the batch file showing all of the steps to create the file system shown below. Instructions Create a batch file clifilesystem.cmd using Notepad which performs the following steps to create the file system shown below. Also use a proper comment for each step before the command. Proof your work. Finally submit the clifilesystem.cmd file in Blackboard Figure 1. The clijfilesystem.cmd file system Work from Desktop unless using an absolute path Desktop NOS110 OS Labs Homework...

  • 3. File and Directories Files and directories provide a basic abstraction of persistent data to users. Here we explore (ab systems work, focusing on links. Sometimes links lead to pretty odd performa...

    3. File and Directories Files and directories provide a basic abstraction of persistent data to users. Here we explore (ab systems work, focusing on links. Sometimes links lead to pretty odd performance problems. (a) Assume we have a regular file that is referred to by the pathname /a/b/c/orig.txt-how many directories wil we access when opening this file? (b) Now assume we create a hard link to this file, as follows: 1n /a/b/c/orig.txt /hard.txt. How directories will we access when opening...

  • Do it on (c) pls..... 1. Assume you have an input file with 6 integer values....

    Do it on (c) pls..... 1. Assume you have an input file with 6 integer values. Scan these values into an appropriate array. 2. Create a user defined function that takes your array as an input and order your array from lowest to highest. Ex. If you have an array called num, then num[0] should contain the smallest value while num[5] will contain the largest value. 3. Output the values between 50-75 into an output file called “results.txt” 4. Any...

  • In this Assignment assume that you have a text file with numbers separated by newlines. you...

    In this Assignment assume that you have a text file with numbers separated by newlines. you want to read the numbers in and add them up. since we want to be flexible on the type and size of numbers we can handle, we will use double floating point. Text file contains following numbers 8 3 6.5 9 0 assume that the files are well-formed: it will contain only valid numbers separated by newlines. Using C language

  • please help in matlab!!! Thank you so much in advance! Modify fn = input('input file name:',...

    please help in matlab!!! Thank you so much in advance! Modify fn = input('input file name:', 's' ); ofn = input('output file name: ','s' ); ih = fopen( ifn,'r'); oh = fopen( ofn,'w' ); ln = ''; while ischar( ln ) ln = fgets( ih ); if ischar( ln )    fprintf( oh, ln ); end end fclose( ih ); fclose( oh ); % fprintf( oh, ln ) has a paramter oh of file %handle. Ln is written to 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