1. [100 25*4] Create a script of the session while experimenting with the follow
ID: 3881730 • Letter: 1
Question
1. [100 25*4] Create a script of the session while experimenting with the following commands in one your directories I. List currently running jobs II. Kill one of the running jobs III Cat an existing file using a command that misspells one character in the filename IV. Correct the character using the next command run cat on correct file V. Try to list files in lost+found directory VI. Find utilities to compress files and directories on your system VII Run the Is command with-help option VIII Run the help command on echo IX. Echo your name and pipe it to the od command to see each character X. Create a new file containing only your name using echo XI Remove the file you just created XII Copy an existing file in your directory to another file XIII Move the copies file to another file XIV. Use grep to search for a word in one of your files XV. Display the first line of a file XVI Display the last line of a file XVII Sort the contents of a file XVII Compare two files XIX Find the type of files in your directory XX. Compress a directory using tar command XXI Compress the tar file you created using gzip XXII Put this.tar.gz file into another directory and uncompresss to get original directory back XXIII List the users on your system XXIV. Write today's date and time Exit the script using exit command XXV. Upload the script file you just created as the submission for this assignment on eLearningExplanation / Answer
ps --currently running process or jobs
kill jobid ---is used to kill particular process
compress --compress the files
ls -help //list command
echo -help //display help and exit
vi file123 //create the file in vi editor
name=name123
echo $name //display the name using shell script
rm file123
cpy /home/path to file123 /home/new path // do before removing once file is removed we cannot get it back by normal users
mv /home/path to file123 /home/new path //move the file another location
grep "word123" file123 //match the word word123 in the file123
sed -n '1p' file123 //to print first line in the file
sed -n '$p' file123 //to print end line in the file123
sort file123 //sort the file
cmp file123 file234 //compare the two files
ls -l // list all the information regarding files
gzip file123 //inorder to zipp the file
cd newdierctory //inorder to change the directory
cp /home/path to compreesed file123 /home/new-path //to copy the file
ugzip file123 //to unzip the zipped file
who -q //count of all loged on users
now=`date` //date of the particular day
exit //used to exit from the script
Feel free to reach out if you have any doubts.
Rate if the answer was helpful.
Thanks
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.