Question

In: Computer Science

Using a simple text editor, create a text file with the following name "Test" and content:...

Using a simple text editor, create a text file with the following name "Test" and content:

GNU GENERAL PUBLIC LICENSE

The GNU General Public License is a free, copy left license for the GNU General Public License is intended to guarantee your freedom to GNU General Public License for most of our software; it applies …

  1. Write the command to create the text file.
  2. Print the file permissions.
  3. Create a directory named "361"
  4. Copy file "Test" to the directory "361"
  5. Rename the file to "GNU"
  6. Print the last 5 lines.
  7. Change the file owner to "Reem"
  8. Add Sticky bit.
  9. Make a search of "General" word
  10. Display the total number of characters in the file.

please give the answer in linux with secreenshot

Solutions

Expert Solution

A. Create file using touch command then open vi Editor and copy paste contents of text. Press Esc :x to save changes to Test file using vi editor

B. Print the file permissions using ls -l command

  1. Create a directory named "361"
  1. Copy file "Test" to the directory "361"
  1. Rename the file to "GNU"

  1. Print the last 5 lines.

  1. Change the file owner to "Reem"

First you can add the user “Reem” using sudo adduser Reem command then change the owner of the file to this user using the chown command

  1. Add Sticky bit.

You can add sticky bit to the file using chmod +t GNU command

  1. Make a search of "General" word using the grep pattern filename command
  2. Display the total number of characters in the file using wc -c filename command.

Below is the list of commands used:

touch Test

vi Test

ls -l Test

mkdir 361

cp ./Test 361

cd 361

mv Test GNU

tail -n 5 GNU

sudo adduser Reem

chown Reem GNU

chmod +t GNU

ls -l GNU

grep "General" GNU

wc -c GNU


Related Solutions

In linux , Using a simple text editor, create a text file with the following name...
In linux , Using a simple text editor, create a text file with the following name "Test" and content: GNU GENERAL PUBLIC LICENSE The GNU General Public License is a free, copy left license for the GNU General Public License is intended to guarantee your freedom to GNU General Public License for most of our software; it applies … 2-Write the command to create the text file. 3-Print the file permissions. 4-Create a directory named "361" 5-Copy file "Test" to...
Use Vi text editor or ATOM to create a bash script file. Use the file name...
Use Vi text editor or ATOM to create a bash script file. Use the file name ayaan.sh. The script when ran it will execute the following commands all at once as script. Test your script file make sure it works. Here is the list of actions the script will do: It will create the following directory structure data2/new2/mondaynews off your home directory. inside the mondaynews, create 4 files sports.txt, baseball.txt, file1.txt and file2.txt. Make sure file1.txt and file2.txt are hidden...
Step 2: using text editor (WordPad) to create a web page with the following content (you...
Step 2: using text editor (WordPad) to create a web page with the following content (you may cut-and-paste): ----------------------------------------------------------------------------------- Just a screenshoot of the output Book-O-Rama Catalog Search Book-O-Rama Catalog Search     Choose Search Type:          Author      Title      ISBN             Enter Search Term:             ------------------------------------------------------------------------------------- Then save above document to the local directory (C:\temp) and make sure that you saved it in the plain text format (in the “Save as type” popup window, choose “Text Document...
Using a text editor, create a file english.txt containing the following words: yes no go come...
Using a text editor, create a file english.txt containing the following words: yes no go come thanks goodbye Create a second file chinese.txt contain the following words: shi bu qu lai xiexie zaijian Write a program that reads the words from english.txt so that the successive slots of a char * array english point to them. Use the %s conversion code in a fscanf call to read one word at a time. Similarly, read the words from chinese.txt so that...
Word Frequencies (Concordance)    1. Use a text editor to create a text file (ex: myPaper.txt)...
Word Frequencies (Concordance)    1. Use a text editor to create a text file (ex: myPaper.txt) It should contain at least 2 paragraphs with around 200 or more words. 2. Write a Python program (HW19.py) that asks the user to provide the name of the text file. Be SURE to check that it exists! Do NOT hard-code the name of the file! Use the entry provided by the user! read from the text file NOTE: (write your program so that...
Python: Word Frequencies (Concordance) 1. Use a text editor to create a text file (ex: myPaper.txt)...
Python: Word Frequencies (Concordance) 1. Use a text editor to create a text file (ex: myPaper.txt) It should contain at least 2 paragraphs with around 200 or more words. 2. Write a Python program (HW19.py) that asks the user to provide the name of the text file. Be SURE to check that it exists! Do NOT hard-code the name of the file! Use the entry provided by the user! read from the text file NOTE: (write your program so that...
Write a simple phonebook using c++ that read text file name list.txt and has:  first name, last...
Write a simple phonebook using c++ that read text file name list.txt and has:  first name, last name, and phone number as the example: MIKEL BUETTNER 3545044 ENOCH BUGG 2856220 BRENDON LAVALLEY 433312 QUINTIN CREEK 5200413 JAMISON MILLETT 6243458 FLORENCIO PUMPHREY 3296862 DARRICK FREGOSO 6868442 TOBIAS GLASSMAN 6040564 and then ask the user to add a new contact first name, last name, and phone number and same the information into a file. Use array and pointer
Create a Word file containing the following: The full name of the “test subject” The test...
Create a Word file containing the following: The full name of the “test subject” The test subject is a person, not yourself, who can say the names of the products. The best test subject is one who is adamant about being an expert who can distinguish brand A from B. You cannot be the test subject because you generate the sequence, and the test subject cannot see it for an unbiased test. Pets and babies are not allowed as they...
a) Using vi (or from your favorite editor) create a file called myscript. Enter the following...
a) Using vi (or from your favorite editor) create a file called myscript. Enter the following text into the myscript file. #!/bin/bash echo -e "this is a sample shell script. \t It displays mounted filesystems \a" mount b) Now, save the file and quit the editor. c) type ls -l myscript and hit enter. What permissions do you have on the file? d) type bash myscript and hit enter. What did it do? e) what does the \t and \a...
Create this C++ program using classes 1. Create a file text file with a string on...
Create this C++ program using classes 1. Create a file text file with a string on it 2. Check the frecuency of every letter, number and symbol (including caps) 3. Use heapsort to sort the frecuencys found 4. Use huffman code on the letters, symbols or numbers that have frecuencys I created the file, and the frecuency part but i'm having trouble with the huffman and heapsort implementation.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT