Question: using node js as a shell on a linux system Run the node commands below and answer the following questions. var f = fs.openSync(/tmp/testFile.txt, 'w+');

using node js as a shell on a linux system

Run the node commands below and answer the following questions.

 var f = fs.openSync("/tmp/testFile.txt", 'w+'); fs.writeSync(f, "Hello World! ", 20000); fs.closeSync(f); 
  1. If you view /tmp/testFile.txt in less, what do you see? Why?
  2. What is the logical size of /tmp/testFile.txt? What is the physical size? Obtain both values just using node functions. Explain how each was determined.
  3. What system call(s) is the call to fs.writeSync() making? How do you know?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!