Question

There are multiple options for text editors in Linux: vi, Nano, vim, etc. My favorite is...


There are multiple options for text editors in Linux: vi, Nano, vim, etc. My favorite is vi. Demonstrate that you are able to use a text editor. File copy, move, and removal. Try not to rely on “cd” commands. Go to your Labs directory. Use one command to finish each step, provide screenshots of commands and results.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

lab1.sh

cd /
#a
touch first_name
#b) Create a copy of the file in the same directory using any name you like
cp first_name second_name
#c) Create a subdirectory backup.
mkdir backup
#d) Move the original file (your first name) to backup and rename it using your last name.
mv first_name backup/last_name
# e) Create a copy of the backup directory (and all files in it); name it backup2.
cp -rf backup backup2
#f) Delete the original directory backup.
rm -rf backup
#g) Rename backup2 to whatbackup
mv backup2 whatbackup
# List the files in the new directory whatbackup
ls whatbackup

chattanya@chattanya:-$ sudo /lab.sh last name chaitanya@Chaitanya $ cd / chaitanya@Chaitanya:/$ cd whatbackup/ chaitanya@chaitanya: /whatbackup5 last name

2)

#a) Create a file named today with the text “hello” in it. Provide command and screensho
echo "hello" > today
#b) Create a hard link named hardlinktomorrow linked to today
ln today hardlinktomorrow
#c) Create a soft link named softlinkone linked to today. Create another soft link named softlinktwo
ln -sf today softlinkone
#d) linked to hardlinktomorrow
ln -sf hardlinktomorrow softlinktow
#e) View information of the 4 files (what command should you use to produce output) – how do you verify which file is a hard link and which file is a soft link?
#- using ls -l command we can verify which one is link and which link is point to which file. hard link should not point to any one. but it should change with changing the main file even if main file is removed hard link will work same alon soft link will not work.
#f) Use a text to edit softlinktwo and change “hello” to “hello, world”. Now, what is the content in each of the files? Provide screenshots. Are they all the same? Justify your answer.

media%2F65f%2F65fa743d-e266-4321-b149-66

all are same because all are links come from today and in any link will change it will directly reflect to related link file.

#g) How do you remove all these hard and soft links? Apply the command and provide screenshots.

#using unlink command we can remove links.

unlink softlinkone
unlink softlinktow
unlink hardlinktomorrow

media%2F4e1%2F4e15f75f-bbf9-4e3f-959d-09

Add a comment
Know the answer?
Add Answer to:
There are multiple options for text editors in Linux: vi, Nano, vim, etc. My favorite is...
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
  • Hi I beed this assignment to be in a script in linux from codio. Can someone...

    Hi I beed this assignment to be in a script in linux from codio. Can someone please help me step by step thank you. Overview: In this milestone, you will demonstrate your ability to create a basic script in Linux. Review the Final Project Guidelines and Rubric document to see how this milestone will prepare you for the scripting portion of the project. You will perform this milestone in Codio in the unit called “Milestone 2: Scripting.” You will create...

  • Execute the following UNIX commands and paste the results in a text editor like Microsoft Word...

    Execute the following UNIX commands and paste the results in a text editor like Microsoft Word Create a directory using “mkdir” and name the directory “test” Change directory to test In the test directory, create a file using nano and name the file “NewDoc.c” Use “cd ..” Execute “ls” Create a file “temp.c” using nano Delete “temp.c” using the “rm” command. Execute each command in the question, copy and paste the result from the terminal window into Microsoft word or...

  • Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following...

    Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following tasks based on the Linux Fundamentals lecture. For this lab, take screenshots for all major steps completed to illustrate that each task was successfully completed the same method as would be used for other labs). Tasks: 1. Create a new user named Billy Bob using the command linter face 2. Add Billy Bob to the sudoers group 3. Update and upgrade your Linux distribution...

  • IT 255 Milestone Two Guidelines and Rubric Overview: In this milestone, you will demonstrate your ability...

    IT 255 Milestone Two Guidelines and Rubric Overview: In this milestone, you will demonstrate your ability to create a basic script in Linux. Review the Final Project Guidelines and Rubric document to see how this milestone will prepare you for the scripting portion of the project. You will perform this milestone in Codio in the unit called "Milestone 2: Scripting." You will create this script with the vi editor. The script will combine multiple commands and simplify a repeatable task....

  • 19. UNIX/Linux normally include two editors: vi and (choose the single best answer). 20. You can...

    19. UNIX/Linux normally include two editors: vi and (choose the single best answer). 20. You can use thecommand to create empty a create b. make c touch d mu 21. Which command can be used to leave vi temporarily to access the command line? 22 If you execute the contents of filel are sorted and the results are stored in file2. a sort file1 -ofile2 b. sort file1 >file2 c sort filel -d file2 d sort filel filez field or...

  • do numbers 4-8 4. Given any directory, use the Is command to display: • all files...

    do numbers 4-8 4. Given any directory, use the Is command to display: • all files and sub-directories starting with the letter "D" (note do not list anything in any sub-directory) • its immediate sub-directories (sub-directories only, and no other ordinary files) its immediate hidden sub-directories only - take a screenshot (#3-3) that clearly shows the command and the result. 5. Assume that the following files are in the working directory: $ ls intro notesb ref2 section 1 section3 section4b...

  • 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...

  • give notes to what each look like and description in text form Lab#1 –Learning Some Basics...

    give notes to what each look like and description in text form Lab#1 –Learning Some Basics applied Skills We have completed our initial install of Ubuntu and begun to feel our way around our new system. The following assignment will help you familiarize yourself with your new environment. Please use your system to test answer the following questions. After you have logged in and opened a term window... SECTION I: Simple Navigation of the file system 1. Use df command...

  • Completion is a screenshot of the batch file showing all of the steps to create the file system s...

    Completion is a screenshot of the batch file showing all of the steps to create the file system shown below. Instructions Create a batch file clifilesystem.cmd using Notepad which performs the following steps to create the file system shown below. Also use a proper comment for each step before the command. Proof your work. Finally submit the clifilesystem.cmd file in Blackboard Figure 1. The clijfilesystem.cmd file system Work from Desktop unless using an absolute path Desktop NOS110 OS Labs Homework...

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