Linux and Bash for Data Engineering Week3
.docx
keyboard_arrow_up
School
Grand Rapids Community College *
*We aren’t endorsed by this school
Course
MISC
Subject
Computer Science
Date
Dec 6, 2023
Type
docx
Pages
3
Uploaded by ConstableWildcatMaster401 on coursehero.com
Congratulations! You passed!
Grade received 100%
Latest Submission Grade 100%
To pass 80% or higher
Go to next item
1.
Question 1
What is an example of a control flow in Bash?
1 / 1 point
A
for
loop.
Creating a variable.
Making a script.
Correct
You got it! A
for
loop allows for iteration tasks, such as moving a list of files to a new location.
2.
Question 2
What happens when this command runs?
false || echo "hi"
1 / 1 point
An error prints to stdout.
Nothing prints out.
The word "hi" prints to stdout.
Correct
You got it! The
||
operator serves as an
OR
statement.
3.
Question 3
What happens when this command runs?
false && echo "hi"
1 / 1 point
The word "hi" prints to stdout.
An error prints to stdout.
Nothing prints out.
Correct
You got it! The
&&
operator is an AND statement.
4.
Question 4
Why would a data scientist need to truncate a large file before bringing it into a popular data science
library like Pandas?
1 / 1 point
It improves the accuracy of a prediction.
To remove null values.
To convert the data to a small data problem.
Correct
You got it! Many popular data science libraries are designed to work around smaller data sets and it
may not be possible to open a larger file in them.
5.
Question 5
What would this statement return?
printf "hello\nworld\n" | grep hello
1 / 1 point
Nothing.
hello
world
hello
Correct
You got it! Each line of the print statement is evaluated by
grep
and the match is returned.
6.
Question 6
What is a key difference between
find
and
locate
?
1 / 1 point
The
locate
command uses metadata to search the filesystem.
They are both the same command.
The
find
command uses metadata to search the filesystem.
Correct
You got it! The locate command searches a database that of a historical snapshot of the state of the
filesystem.
7.
Question 7
What would this command do?
find . -perm /+x ! -name '.*' -type f
1 / 1 point
Find all files with the word
x
in them.
Find all directories in the search path
Find all executable non-invisible files.
Correct
You got it! The
-perm
flag allows for a search of UNIX permissions.
8.
Question 8
What would be the output of this command?
printf "apple\npear\npeach\n" | grep -v pear
1 / 1 point
apple peach
pear
apple pear peach
Correct
You got it! The
grep -v
flag is a negative search.
9.
Question 9
What reason could a data scientist have for using the following command?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Explain the meaning of each command below, along with its switches/options and arguments/filenames. Use the man pages of each command and other documentation and examples to help you.
dd if=myfs.img bs=1 skip=SKIPNUMBER count=FILESIZE of=rfile2
sudo mount -o loop myfs.img mnt
shred -uxz mnt/file3
ntfsundelete --undelete --inodes INODE --output rfile1 ntfs.im
arrow_forward
pls check if my unix answers are correct and provide corrections if necessary(commas separate the commands)
Move cursor to the last line of the file with one key: G
Use one key to move cursor to bottom line of screen: L
Move cursor to line 32 with three keys: <32>G
Turn on/off line numbers: :set nu , :set nonu
Forward/backward one page: ctrl-f , ctrl-b
Join the current line with next line: J
Replace the whole current line with “abc” with five keys:
Append text “abc” at the end of current line: A
You just deleted one line by accident. Undo this with one key: u
Delete next six lines including current line with three keys: 6dw
Delete from cursor to the rest of current line with one key: D
Save your changes without quitting vi: :w
Delete next five lines from current line and paste them back at the end of the file: 5dd, p
Delete next seven characters from cursor with two keys: 7x
Swap current char with the next one with just two keys: r<c>
Temporarily leave vi as a background…
arrow_forward
Write the answer of the following command below: a. Write a command to install the package ABCD by using rpm. b. Write a command to extract files verbosely from a tar file BACKUP. c. Write a command to decompress file XYZ. d. Write a command to display lines numbered from 9 to 12 of a file ABC. e. Write a command to print the content uniquely of a file student.txt. f. Write a command to know the location of application program “gcc”. g. Write the patch number and version number of given package. ethereal-0.8.9-1.i386.rpm. h. Write a command to show the shared libraries used by an application CIS.
arrow_forward
this pdf file was converted from text document. i did this in order to put here so you can convert this pdf to .txt format and read with f.readlines() command. extract the necessary data from file and i want you to write code process which extracts data
file:///C:/Users/abdul/Downloads/SodaPDF-converted-badDataFile.pdf
arrow_forward
IF YOU DONT KNOW HOW TO BASH SCRIPT IN LINUX THIS DOESNT APPLY TO YOU.
anybody who knows linux can you help me, Write a script to automate the creation of new users and groups, i have this so far but the groups isnt working. I NEED HELP MAKING THIS WORK. HERE IS MY SCRIPT.
#!/bin/bash
#location of txt with usernames
userfile=./users
#location of txt with groupnames
groupfile=./groups
#extract usernames
username=$(cat ./users | tr 'A-Z' 'a-z')
#define default password for usernames
password=ch@ng3m3!
#run loop to add users
for user in $username
do
useradd $user
echo $password | passwd --stdin $user
groupadd -f $groups
done
#extract groupnames
groupname=$(cat ./groupnames | tr "A-Z' 'a-z')
For groups in $groupname
do
groupadd -f $groups
done
#read total users processed with script
echo "$(wc -l ./users) users have been created"
tail -n$(wc -l ./users) /etc/passwd
#read total groups processed with script
echo…
arrow_forward
Learn the syntax of the tar command using the man command and the link referred to in To Practice and Explore: Text File Utilities #9.
Use tar"to stuff" three files and then "unstuff" them into a new directory. Include the -v option.
Turn in the following commands (with no errors) and any output from the commands.1) ll to show the original 3 files2) run the tar command to stuff three files3) ll to show the 'tar archive'4) mkdir newdir to create a new directory to unstuff the 'tar archive'5) mv the 'tar archive' to the new directory newdir6) from newdir, run the tar command to unstuff the three files into the newdir directory7) ll the new directory newdir to show the extracted files
arrow_forward
1- When you use the Undo feature of Microsoft Word, what happens?
Your answer:
Document is saved
Last operation is repeated
Last Operation is cancelled
Spell checker is used
A new line is inserted at the current location
2-The graphical pictures that represents a file in your windows environment is called a(n)
Your answer:
Gif
Menu
Start
Task
Icon
3-Which one is a CPU type?
Your answer:
Intel Pentium IV
inkjet
laserjet
Acer Aspire
Veezy GO
4-If you accidentally delete part of a document, you can repair your mistake with the
Your answer:
Backspace key
Esc key
Undo command
Redo command
All of the above
5-Computers connected to Internet use some protocols in order to set up proper information exchange (by means of WEB, File Transfer, E-Mail etc.) between each
other. What is the general name of that protocol suit?
Your answer:
Windows
Apple Talk
ICQ
IRC
TCP/IP
6-The equation in cell A8 is =E10 + E7 + 7 + A7. What will the equation in cell A9 be if the equation…
arrow_forward
Bash Shell Scripting – Simple File System Navigation
Write a bash shell script with the following capabilities:
Create a bash script ~/test1.sh with any text editor.
Write a bash script that does the following:
Echo your current directory to the screen.
Change directory to your home directory.
Change directory to a child directory within your home directory.
List all of the files that end with .c within the child directory.
Navigate back to your home directory.
Run your script after doing a chmod 777 on the script.
Take a screenshot of the console output.
arrow_forward
Execute the following LINUX commands. Take the screen shot of each answer and paste after the question.
a)Create a .txt file by giving your Student ID as name of the file in Maths
Example: 2019193001.txt
b)Execute the command to list all the files end with word “ths” in the current directory.
c) Execute a command to get help about remove file
d)Execute a command to move contents of file txt to introduction_maths.txt
e) Execute a command to copy the file created in question 4 to your home folder.
f)Execute a command to clear the screen
g) Execute a command to search the file txt for the word “math”
Note: command should ignore the case and it should only print the count of matching lines.…
arrow_forward
Section 19.4 talks about how to change the recovery algorithm to make savepoints and to roll back to a savepoint. Section 19.9.3 talks about save points.
arrow_forward
Bash Shell Scripting – Simple File Manipulation
Write a bash shell script with the following capabilities:
Create a bash script ~/test2.sh with any text editor.
Write a bash script that does the following:
Change directory to your home directory.
Create a child directory called mycode.
Change to the mycode directory.
Copy all files that end with .c that you have developed in this course to the mycode directory.
Navigate up a directory.
Create a new child directory called mycode2.
Copy all files from the mycode directory to the mycode2 directory.
Rename the mycode directory to deadcode.
Remove the deadcode directory and all its files.
Run your script after doing a chmod 777 on the script.
Take a screenshot of the console output.
arrow_forward
Create the directory “Project” & perform the following actions: a) Create the files ‘f1.txt’, ‘f2.txt’, ‘f3.txt’ and ‘f4.txt’ in it. b) Set the permission of ‘f1.txt’ to -rwx r-- r--, permission of ‘f2.txt’ to -w- r-x r—c) Combine the files f3 and f4 using the paste commandd) Show the use of cut command on any of the above files
2. Write a Shell Script to perform the following: a) Display the files with its access permissionsb) Display the information in megabytes about how the space is allotted in the file system such as used and free space.c) Display the currently running processesd) Display how long the system has been up since the last boot3. Create a shell script to display your name, enrollment ID, the program and the courses you study in this semester. Use the correct variables and display the above to the standard output (screen).
4. Write a bash script that takes the side of a cube as a command line argument and displays the volume of the cube.
5. Write a bash script to…
arrow_forward
Using the Internet, research the command line version of FTK Imager and identify the command used to generate SHA1 and MD5 hashes for a specific file. Next, launch a Command Prompt window and navigate to the FTK Imager CMD tool (C:\Program Files\AccessData\FTK Imager\cmd\). Use the command you identified in your research to verify the SHA1 and MD5 hashes of the Evidence_drive1.001 file used in this lab."
try both these command
The full path to the FTK Imager command-line executable is "C:\Program Files\AccessData\FTK Imager\cmd\ftkimager.exe."
The option --verify is utilized to confirm the hash of the specified file.
The full path to the file intended for hash verification is "C:\Daubert Standard Evidence\Image1\Evidence_drive1.001."
no hash show here is picture showing need help with that pleasee
arrow_forward
Explain briefly the following commands
keytool -genkey -alias sdo -keyalg RSA
keytool -certreq -alias sdo -file sdoCSR.cer
keytool -import -file sdo.cer -alias sdo –trustcacerts
keytool -import -alias sdo -file fromsdo.cer
arrow_forward
What command can I use to add these two files together and place them in a new file called whhaatt?
[root@localhost ~]# cat > list1
this
that
they
those
[root@localhost ~]# cat > list2
are
arent
aint
apps
arrow_forward
How to show the output of this code ?
<?php$cache_file = 'data.json';if(file_exists($cache_file)){$data = json_decode(file_get_contents($cache_file));}else{$api_url = 'https://content.api.nytimes.com/svc/weather/v2/current-and-seven-day-forecast.json';$data = file_get_contents($api_url);file_put_contents($cache_file, $data);$data = json_decode($data);}
$current = $data->results->current[0];$forecast = $data->results->seven_day_forecast;
?>
arrow_forward
Create a batch file
Your batch file should include all required comments for creation and author information.
Your batch file must include but is not limited to these commands:
ECHO
CD
NET
ICACLS
MKDIR
COPY
Comment each line of your batch file as you create it. Don’t forget to include creation and author information.
Create a batch file F:\bat that uses all the required commands and completes the following:
Creates a folder named Scripts on the Root of C
Add a local user named Aisha Bruce with the username ABruce and the password student
Creates a directory in the “E:\CompanyInc\Management” folder named “ABruce_Files”
Creates an ACE for “ABruce” to the “ABruce_Files” folder with these explicit permissions:
Full Control
Re-establishes inheritance to sub-folders and files
Copies the application cmd.exe from the C:\Windows\System32 folder to the “ABruce_Files” folder
Addes ABruce to your Management Group created in assignment 3
Produces an ICACLS Report for “ABruce_Files”…
arrow_forward
Create the directory “Project”& perform the following actions:
a)Create the files ‘f1.txt’, ‘f2.txt’, ‘f3.txt’ and ‘f4.txt’ in it.
b)Set the permission of ‘f1.txt’ to -rwx r-- r--, permission of ‘f2.txt’ to -w- r-x r—
c)Combine the files f3 and f4 using the paste command
d)Show the use of cut command on any of the above files
Write a Shell Script to perform the following:
a)Display the files with its access permissions
b)Display the information in megabytes about how the space is allotted in the file system such as used and free space.
c)Display the currently running processes
d)Display how long the system has been up since the last boot
Create a shell script to display your name, enrollment ID, the program and the courses you study in this semester. Use the correct variables and display the above to the standard output (screen).…
arrow_forward
How can you erase data that your JavaScript commands have stored in local storage?
a.
No action is necessary; this data will be erased automatically when the user closes the browser window or tab.
b.
Call thedrop()method on thelocalStorageobject, passing in the index for thekey: valuepair you want to remove.
c.
Call theremoveItem()method on thelocalStorageobject, passing in the key for the data item you want to remove.
d.
Call thedelete()method on thelocalStorageobject with no arguments.
arrow_forward
write the code to lookup, add and remove phoneentries from the phonebook text file .
These are the code we use for the lookup, add and remove in the case statement.(Lookup)# Look someone up in the phone bookgrep $1 phonebook
(add)echo "$1 $2" >> phonebooksort -o phonebook phonebook
(Remove)grep -v "$1" phonebook > /tmp/phonebookmv /tmp/phonebook phonebook
Write a complete Bash script which will accept up to three command-line arguments: the first one is either (lookup, add or remove), the second one is a name enclosed in single quotes and the third one (if doing an add) is a phone number enclosed in single quotes. Using a case statement to match on either lookup, add or remove, the script should then perform the requested operation. Again here, you should first check for null arguments before continuing with the rest of the script or requested operation. In addition, the person may not be in the phonebook for lookup or remove so, you need to account for this.
arrow_forward
Question no 02:
Write script/command to:-
Question
Script/Command
1
Let the System know that the following script is a bash script.
2
Make VAR an unchangeable and undeletable Variable.
3
Access 8th Argument passed to the script.
4
Print Process ID of the current script.
5
Sleep the system for 2 seconds
6
Print “I have $200”
7
Print all the elements of an array without using loops.
8
Print filename of the current script.
9
Print the exit status of the previous command
10
Print all environment variable
arrow_forward
Greetings again
With your awesome help, I now have a plot with several FIT files. How can I simplify this to just loop through the folder that the FITS files are in, this is the path of one of the folders.
Desktop • harpn_sun_release_package_ccf_2018 • 2018-01-18 • r.HARPN.2018-01-18T14:25:36.145_CCF_A.fits
This is the current code:
import numpy as npimport matplotlib.pyplot as pltfrom astropy.io import fitsfrom astropy.wcs import WCS%matplotlib widget
plt.figure(figsize=(5,5))legends = []
def plot_fits_file(file_path): # used this data to test ---------- # lam = np.random.random(100) # flux = np.random.random(100) # --------------------
# below code will work when you have file # all the plot will be on single chart
hdul = fits.open(file_path) data = hdul[1].data h1 = hdul[1].header flux = data[1] w = WCS(h1, naxis=1, relax=False, fix=False) lam = w.wcs_pix2world(np.arange(len(flux)), 0)[0]
plt.plot(lam, flux) plt.ylim(0, )…
arrow_forward
Please, give permission for these users by using NTFS advance permission in windows 10.Nothing is missing....I wan you to type step by step U1 to 8 so, I can follow yours. When you give permission to each user please type it steps so I can follow, make sure no steps to be missed....Thank you
User1 should be able to change Attributes and Permissions on all files in all folders.
User2 should be able to Read, Append to files from the C folder and in the O folder and all of their respective subfolders, but not delete subfolders.
User3 should have the ability to create folders and files in both the S folder and E folders.
User4 can delete files as well as create folders and files in the A folder.
User5 can delete files as well as create folders and files in the K folder and its subfolders.
User6 should have the ability to Read/Writ and create files and folders in the C folder and O folders as well as delete subfolders. He should also be able to change permissions in the T folder.…
arrow_forward
Please answer the following Bash question, please show your output as well.
1. Write a Bash function named ‘Generate-ID' that generates all possible UGA student id start with 900. The output should be saved into a file named studentID.csv.
2. Write a Bash function named ‘Find_word’ that read wordlist.txt file to find all words end with “ing” and output these words to WordEndIng.csv.
3. The auth.log file (path: /var/log/auth.log) and syslog file (path: /var/log/syslog) are two of the most important log files in Linux. Generally, adversaries target these files so that system administrators couldn’t track what attackers are doing. Write a function named get-linuxlog() that reads all the above two files and stores them into a file named linuxeventlog.txt (Hint use the ‘cat’ command)
arrow_forward
This needs to be done in powershell and I feel clueless. Please help.
PowerShell Lab
Directions:
You have been given a zip file containing several subdirectories and within each subdirectory is a PDF and an image file. Your task is to write a script that will move all the PDF files into a directory called PDF and the images into a directory called images. Your script should create the top level folders (images and pdf) and move all the files.
Hints:
Move-Item can be used to move files/folders
Write-Output($variable) can be helpful in debugging
Need to Submit:
your completed PowerShell script as a .ps1 file
a screenshot of your successful program output
CSV File:
CSV file to go on is posted here
fname
lname
phone
email
Jennifer
Jackson
356-4780-91
Jennifer.Jackson@company.com
Brenda
Anderson
467-9326-03
Brenda.Anderson@company.com
Isaiah
Rose
071-7022-71
Isaiah.Rose@company.com
Brittany
Jordan
241-3146-67
Brittany.Jordan@company.com
Shirley
Obrien
463-1168-32…
arrow_forward
Please help answer the following (both parts a and b)
I have the file run.sh, it currently has unknown permissions. Say I want the owner to have read,write, and execute permissions, the group to have only execute permissions, and others to haveonly execute and read permissions.a. How can I accomplish this using letter codes?b. What is an equivalent command using octal syntax?
(will leave a like)
arrow_forward
I'm trying to fix my Bash script. It's supposed to take an input of multiple usernames, and print which are logged in and in alphabetical order. It's all supposed to be on one line. Can someone fix my script? This is it:
for name in $*
do
users | grep -q "^$name"
if (( $@ == 0 )) ; then
echo $name
fi
done | sort -u | tr '\n' ' '
echo
arrow_forward
Explain what the effect of each of the following commands would be if entered at the Bash prompt? Be as specific as possible.
a) ls *.py
b) mv ./myprog.cpp ..
c) rm [ABC]*
d) ls | wc –l
e) rm [!A-Z]???
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Related Questions
- Explain the meaning of each command below, along with its switches/options and arguments/filenames. Use the man pages of each command and other documentation and examples to help you. dd if=myfs.img bs=1 skip=SKIPNUMBER count=FILESIZE of=rfile2 sudo mount -o loop myfs.img mnt shred -uxz mnt/file3 ntfsundelete --undelete --inodes INODE --output rfile1 ntfs.imarrow_forwardpls check if my unix answers are correct and provide corrections if necessary(commas separate the commands) Move cursor to the last line of the file with one key: G Use one key to move cursor to bottom line of screen: L Move cursor to line 32 with three keys: <32>G Turn on/off line numbers: :set nu , :set nonu Forward/backward one page: ctrl-f , ctrl-b Join the current line with next line: J Replace the whole current line with “abc” with five keys: Append text “abc” at the end of current line: A You just deleted one line by accident. Undo this with one key: u Delete next six lines including current line with three keys: 6dw Delete from cursor to the rest of current line with one key: D Save your changes without quitting vi: :w Delete next five lines from current line and paste them back at the end of the file: 5dd, p Delete next seven characters from cursor with two keys: 7x Swap current char with the next one with just two keys: r<c> Temporarily leave vi as a background…arrow_forwardWrite the answer of the following command below: a. Write a command to install the package ABCD by using rpm. b. Write a command to extract files verbosely from a tar file BACKUP. c. Write a command to decompress file XYZ. d. Write a command to display lines numbered from 9 to 12 of a file ABC. e. Write a command to print the content uniquely of a file student.txt. f. Write a command to know the location of application program “gcc”. g. Write the patch number and version number of given package. ethereal-0.8.9-1.i386.rpm. h. Write a command to show the shared libraries used by an application CIS.arrow_forward
- this pdf file was converted from text document. i did this in order to put here so you can convert this pdf to .txt format and read with f.readlines() command. extract the necessary data from file and i want you to write code process which extracts data file:///C:/Users/abdul/Downloads/SodaPDF-converted-badDataFile.pdfarrow_forwardIF YOU DONT KNOW HOW TO BASH SCRIPT IN LINUX THIS DOESNT APPLY TO YOU. anybody who knows linux can you help me, Write a script to automate the creation of new users and groups, i have this so far but the groups isnt working. I NEED HELP MAKING THIS WORK. HERE IS MY SCRIPT. #!/bin/bash #location of txt with usernames userfile=./users #location of txt with groupnames groupfile=./groups #extract usernames username=$(cat ./users | tr 'A-Z' 'a-z') #define default password for usernames password=ch@ng3m3! #run loop to add users for user in $username do useradd $user echo $password | passwd --stdin $user groupadd -f $groups done #extract groupnames groupname=$(cat ./groupnames | tr "A-Z' 'a-z') For groups in $groupname do groupadd -f $groups done #read total users processed with script echo "$(wc -l ./users) users have been created" tail -n$(wc -l ./users) /etc/passwd #read total groups processed with script echo…arrow_forwardLearn the syntax of the tar command using the man command and the link referred to in To Practice and Explore: Text File Utilities #9. Use tar"to stuff" three files and then "unstuff" them into a new directory. Include the -v option. Turn in the following commands (with no errors) and any output from the commands.1) ll to show the original 3 files2) run the tar command to stuff three files3) ll to show the 'tar archive'4) mkdir newdir to create a new directory to unstuff the 'tar archive'5) mv the 'tar archive' to the new directory newdir6) from newdir, run the tar command to unstuff the three files into the newdir directory7) ll the new directory newdir to show the extracted filesarrow_forward
- 1- When you use the Undo feature of Microsoft Word, what happens? Your answer: Document is saved Last operation is repeated Last Operation is cancelled Spell checker is used A new line is inserted at the current location 2-The graphical pictures that represents a file in your windows environment is called a(n) Your answer: Gif Menu Start Task Icon 3-Which one is a CPU type? Your answer: Intel Pentium IV inkjet laserjet Acer Aspire Veezy GO 4-If you accidentally delete part of a document, you can repair your mistake with the Your answer: Backspace key Esc key Undo command Redo command All of the above 5-Computers connected to Internet use some protocols in order to set up proper information exchange (by means of WEB, File Transfer, E-Mail etc.) between each other. What is the general name of that protocol suit? Your answer: Windows Apple Talk ICQ IRC TCP/IP 6-The equation in cell A8 is =E10 + E7 + 7 + A7. What will the equation in cell A9 be if the equation…arrow_forwardBash Shell Scripting – Simple File System Navigation Write a bash shell script with the following capabilities: Create a bash script ~/test1.sh with any text editor. Write a bash script that does the following: Echo your current directory to the screen. Change directory to your home directory. Change directory to a child directory within your home directory. List all of the files that end with .c within the child directory. Navigate back to your home directory. Run your script after doing a chmod 777 on the script. Take a screenshot of the console output.arrow_forwardExecute the following LINUX commands. Take the screen shot of each answer and paste after the question. a)Create a .txt file by giving your Student ID as name of the file in Maths Example: 2019193001.txt b)Execute the command to list all the files end with word “ths” in the current directory. c) Execute a command to get help about remove file d)Execute a command to move contents of file txt to introduction_maths.txt e) Execute a command to copy the file created in question 4 to your home folder. f)Execute a command to clear the screen g) Execute a command to search the file txt for the word “math” Note: command should ignore the case and it should only print the count of matching lines.…arrow_forward
- Section 19.4 talks about how to change the recovery algorithm to make savepoints and to roll back to a savepoint. Section 19.9.3 talks about save points.arrow_forwardBash Shell Scripting – Simple File Manipulation Write a bash shell script with the following capabilities: Create a bash script ~/test2.sh with any text editor. Write a bash script that does the following: Change directory to your home directory. Create a child directory called mycode. Change to the mycode directory. Copy all files that end with .c that you have developed in this course to the mycode directory. Navigate up a directory. Create a new child directory called mycode2. Copy all files from the mycode directory to the mycode2 directory. Rename the mycode directory to deadcode. Remove the deadcode directory and all its files. Run your script after doing a chmod 777 on the script. Take a screenshot of the console output.arrow_forwardCreate the directory “Project” & perform the following actions: a) Create the files ‘f1.txt’, ‘f2.txt’, ‘f3.txt’ and ‘f4.txt’ in it. b) Set the permission of ‘f1.txt’ to -rwx r-- r--, permission of ‘f2.txt’ to -w- r-x r—c) Combine the files f3 and f4 using the paste commandd) Show the use of cut command on any of the above files 2. Write a Shell Script to perform the following: a) Display the files with its access permissionsb) Display the information in megabytes about how the space is allotted in the file system such as used and free space.c) Display the currently running processesd) Display how long the system has been up since the last boot3. Create a shell script to display your name, enrollment ID, the program and the courses you study in this semester. Use the correct variables and display the above to the standard output (screen). 4. Write a bash script that takes the side of a cube as a command line argument and displays the volume of the cube. 5. Write a bash script to…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education