Question: IS 2 6 4 : UNIX / Linux II Homework 1 : Command Line Review ( 5 0 points ) 2 0 2 4 1
IS: UNIXLinux II
Homework : Command Line Review points
Write a command to display the contents of your current directory; the listing should show the permissions
on each entry and should include any hidden files in the directory:
Write the command to move to the etc directory, which is inside the root directory; use an absolute path in
your answer:
What command could you issue to create a new system group called jdoegroup on your system:
What command could you use to install the lynx program on your fedora red hat system, assuming you
had not yet downloaded any package files needed for the application:
Assume a file called newdata is in the home directory while you are currently in the homemyname
directory. Using relative paths, write a single command to copy the file newdata to your current directory:
Write the command to display the contents of a file in your current directory called notes so that you have
forward and backward page control and the display shows line numbers on each line:
Write a command to display only the nd line of the notes file which is in your current directory:
Assume there is a file called errorlog in the root directory ie a directory called root inside the actual
system root directory and you wish to display the contents, but do not have permission to read the file. You
are, however, a member of the admin group. Write a command to display the file while logged in as your
current user:
You wish to set the permissions on a file called prog in your current directory to: rwxrxwx Write the
chmod command to do this using octal syntax:
Assuming you have separate files called: file program and scriptC in your current directory, write a
single command to put copies of each of these files in the directory: allfiles which is a subdirectory of the
root directory you have required permissions:
Assume you have two files called PartA and PartB in your current directory, and you wish to combine these
files verticallyone after the other without a break into a file called PartBA such that the contents of file
PartB appear first followed by the contents of file PartA. Write the command for this:
After logon what command do you issue to change to the system admin user root user:
A file called actionlog is in the boot directory you are in your home directory and you wish to display all
lines from that file which have the word linux in them; write the command to do this without changing
directories:
Write the command for systemd systems like Fedora and Red Hat that will check whether the SELinux
security process is running in enforcing or permissive mode:
You wish to add the contents of file notes in your current directory to the file allnotes also in your current
directory. Write a command to perform this using redirection of output:
Write a single command to create a new directory tree called mystuffarchiveprogs which is to be a
subdirectory of your current directory none of the new directories exist:
Write the command to create a new user calls ISUser and make that user a member of the IS group
which already exists:
After running top in the background, you now type ps and receive the following result:
PID TTY TIME CMD
pts:: bash
pts:: top
pts:: ps
Write the command to terminate the top process make sure it will terminate, regardless of system status:
Assume that you wish to delete the directory called garbage and all its subdirectories, and that garbage is
a subdirectory of your current directory, but you do not know if garbage has any other files in it Write
single command to accomplish this:
Assume that you attempt to execute a script called ShowStats but receive the message permission denied.
Write an alternate command that should work without actually changing permissions on the file assume
you have read permission on the file:
After logon write the command to check the status of a service called carpald is running and active on
your system:
Write the systemd command to check whether the firewall process is loaded and active:
Write a command to display the available network interfaces on your machine including the current MAC
and IP addresses:
Using relative paths, type the command to copy the file somethingnew which is in your current directory
into your parent directory changing the name to somethingold After the operation the file somethingnew
should no longer exist in your current directory. Also, the command should warn you if you are about to
overwrite an existing file
Write the combined command such that script adddata will run only if the script datacheck runs
successfully before trying to run adddata:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
