Question

ce the following activities on your Linux virtual machine. Then complete estions. Write a script file which when executed wil

using lubuntu

0 0
Add a comment Improve this question Transcribed image text
Answer #1

echo displaying date
#For printing date in given format
date +"%d.%m.%Y"

echo enter name to create directory
#read user input into variable name
read -p 'directory name:' name
#make directory in PWD location with given name
mkdir $name
cd /$name
echo enter name to create file
#read user input into variable name
read -p 'file name:' name2
#create a file using echo
echo > $name/$name2
#COPY password file into created file
cp /etc/passwd $name/$name2
#copy all files from home to new directory
cp -r $HOME $name
#list all the contents from new directory
#l list long , r for recursive searching , h for human readable manner
ls -lrh $name

#Input:
#sss
#myfile.txt
#Your Code's Output

#output:
#displaying date
#30.04.2019
#enter name to create directory
#enter name to create file
#total 3.0K
#drwx------ 2 nobody3 nobody3 1.0K Apr 30 13:36 root
#-rw-rw-rw- 1 nobody3 nobody3 1.8K Apr 30 13:36 myfile.txt

Add a comment
Know the answer?
Add Answer to:
using lubuntu ce the following activities on your Linux virtual machine. Then complete estions. Write a script file which when executed will perform the following: First display today's date in d...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • (In Linux) 1. Create a file to write to from your script and save it as...

    (In Linux) 1. Create a file to write to from your script and save it as “.txt”. 2. Write the following information to the file that you created in Step 1: Today's date Your full name Your student ID The name of your course What directory you are in File permissions of the file that you created that allow everyone to read, write, and execute The long list of files in your current directory, providing all items and their process...

  • Must be done in python and using linux mint Write a program to create a text...

    Must be done in python and using linux mint Write a program to create a text file which contains a sequence of test scores. Each score will be between 0 and 100 inclusive. There will be one value per line, with no additional text in the file. Stop adding information to the file when the user enters -1 The program will first ask for a file name and then the scores. Use a sentinel of -1 to indicate the user...

  • LINUX QUESTIONS (dont have to display output, I will be running these commands myself to check...

    LINUX QUESTIONS (dont have to display output, I will be running these commands myself to check the output) Display the command(s) used to do the following: create an empty file called history by using just a redirection operator. Verify and show. Show/verify all results (i.e., all commands and their corresponding outputs). Wait 1 minute or more and then display the command(s) used to do the following: change the timestamp on the history file you just created. Verify/display the change. Show/verify...

  • Perform all of the following steps using Notepad to complete this assignment: 1) Begin by creating...

    Perform all of the following steps using Notepad to complete this assignment: 1) Begin by creating a new file in your text editor and include all of the basic HTML code like you did in your previous assignments. Or you can simply make a copy of your HTML file from last week and name the new copy LastFirstAssignment7.html (where “Last” is your last name and “First” is your first name), but be careful not to overwrite your file from last...

  • write the following code using C language. It will be ran in Ubuntu running linux OS...

    write the following code using C language. It will be ran in Ubuntu running linux OS 2 File Management System Write a basic file managment system with following capabilities. Suppose the name of the program is myFS. When it executes as below: myFS Is - /home Figure 6 : First command format The program should provides the file listing of the given directory. The program should list the filename, file size, and time last modified for each file within the...

  • The following are screen grabs of the provided files Thanks so much for your help, and have a n...

    The following are screen grabs of the provided files Thanks so much for your help, and have a nice day! My Java Programming Teacher Gave me this for practice before the exam, butI can't get it to work, and I need a working version to discuss with my teacher ASAP, and I would like to sleep at some point before the exam. Please Help TEST QUESTION 5: Tamagotchi For this question, you will write a number of classes that you...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT