In: Computer Science
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 the directory "361"
6-Rename the file to "GNU"
7-Print the last 5 lines.
8-Change the file owner to "Reem"
9-Add Sticky bit.
10-Make a search of "General" word
Display the total number of characters in the file.
PLEASE GIVE IT A THUMBS UP, I SERIOUSLY NEED ONE, IF YOU
NEED ANY MODIFICATION THEN LET ME KNOW, I WILL DO IT FOR YOU
AS I DONE MOST OF YOUR ANSWERS, THOUGH WE ARE ONLY ALLOWED TO
ATTEMPT ONE ANSWER OR FOUR SUB PARTS, PLEASE GIVE IT A THUMBS
UP
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
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
You can add sticky bit to the file using chmod +t GNU 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