Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

UNIX \" Desbian System \" commands please! Suppose you had a program that stored

ID: 3813286 • Letter: U

Question

UNIX "Desbian System" commands please!

Suppose you had a program that stored log files in the directory /var/log/impProgram and you were worried about the disk running out of room because of the logging requirements for that program. Suppose also that you couldn’t change anything about the log files including the program, the user managing it, or the location of the log files and any solution requires that the space and the configuration files be available at boot. Additionally, the configuration files for this important program are in /etc/impProgram and you need to protect the configuration files from the rest of the computer by making them read-only. Finally, suppose you have a 100MB drive laying around you could use. How would you resolve this problem? (Note: assume you’ve already created the virtual drive and added it to your virtual machine, you will need to create the directories and insert something in them, and show all commands – for interactive commands, list instructions for use and for non-interactive commands, just list the commands. Show the contents of the /etc/fstab and once finished, display the results of the df –h command on reboot)

Explanation / Answer


personal Node first;
personal Node last;
personal long length;
  
personal category Node
  

/**
* A generic inner ListIterator category that implements the
* ListIteratorAPI. it's used as a indicator to traverse the list.
*/
personal category ListIterator implements ListIteratorAPI<E>
personal Node position; // the node on the left of the iterator
personal Node previousPosition; // the previous iterator position
personal Boolean isAfterNext;
personal Boolean isAfterPrevious;
  
/**
* Constructs associate iterator that points to the front
* of the coupled list.
*/
public ListIterator()
  

/**
* Resets the iterator's previousPosition to its current position,
* resets the iterator's current position to the node on the proper of
* its current position (moves the iterator, within the forward direction,
* past the node on the right), and returns the knowledge worth in the node
* that the iterator simply omitted.
*/
public E next() throws ListException
methodology.
}
  
/**
* Returns true if there's a node on the proper of the iterator
* position; otherwise, returns false.
*/
public Boolean hasNext()
come back 1st != null;
else
come position.next != null;
}
  
/**
* Returns true if the iterator position isn't null;
* otherwise, returns false.
*/
public Boolean hasPrevious()
methodology.
}


  
/**
* Inserts a replacement node on the left of the iterator and resets
* the iterator position to the present inserted node.
*/
public void add(E data)
methodology.
}

/**
* Removes the last node omitted by the iterator during a decision to
* either next or previous.
* Throws associate exception if take away isn't known as directly once a
* decision to either next or previous.
*/
public void remove() throws ListException
methodology.
}

/**
* Replaces the info worth within the node on the left of the iterator
* with the input file worth.
*/
public void set(E data) throws ListException
  
else
  
length++;
}

/**
* Adds an element to the end of the linked list.
* @param data the data value to add
*/
public void addLast(E data)
  
  
/**
* Removes the first element in the linked list.
* @return the removed element
*/
public E removeFirst() throws ListException
  
length--;
return data;
}
  
/**
* Removes the last element in the linked list.
* @return the removed element
*/
public E removeLast() throws ListException
  
  
/**
* Returns the first element in the linked list.
* @return the first element in the linked list
*/
public E getFirst() throws ListException
  
  
/**
* The number of elements in this list.
* @return the length of this list.
*/
public long size()
  
  
/**
* @return a string representation of the elements of this list
* in the format [e0, e1, ..., en-2, en-1], where each ei is a data
* value in the list and e0 is the data value in the first node
* and en-1 is the data value in the last node. It returns [] if this
* stack is empty.
*/   
public String toString()
  
  
  
}


package list;

public interface ListIteratorAPI<E>
{
/**
* Resets the iterator's previousPosition to its current position,
* resets the iterator's current position to the node on the right of
* its current position (moves the iterator, in the forward direction,
* past the node on the right), and returns the info worth within the node
* that the iterator just passed over.
*/
E next() throws ListException;
  
/**
* Resets the iterator's previousPosition to its current position,
* resets the iterator's current position to the node on the
* left of its current position (moves the iterator, in the backward
* direction, past the node on the left), and returns the data value
* within the node that the iterator simply omitted.
*/
E previous() throws ListException;
  
/**
* Returns true if the iterator position isn't null;
* otherwise, returns false.
*/
Boolean hasNext();
  
/**
* Returns true if there's a node on the left of the iterator
* position; otherwise, returns false.
*/
Boolean hasPrevious();
  
/**
* Inserts a replacement node on the left of the iterator and resets
* the iterator position to the present inserted node.
*/
void add(E data);
  
/**
* Removes the last node omitted by the iterator during a decision to
* either next or previous.
* Throws associate exception if take away isn't known as directly once a
* decision to either next or previous.
*/
void remove() throws ListException;
  
/**
* Replaces the info worth within the node on the left of the iterator
* with the input file worth.
*/
void set(E data) throws ListException;
  
}



package list;

import java.util.NoSuchElementException;

public category ListException extends NoSuchElementException

}