NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

EXERCISE 1


(Note Use helping commands to solve this)

1)How to view full weekday name using date command.

2)How to view full month name using date command.

3) Display prev/current/next month output using cal command.

4) Display a calendar for the current year using cal command.

5) Display a calendar for the year of 2020.

6)what is the use of cd command.

7)what is the use of ls command.

8)what is the use of cat command.

9)find the meaning of pwd command.

10)find the meaning of useradd command.

11)find the meaning of grep command.

12)find the meaning of sed command.

13)find the meaning of cut command.

14)find the meaning of sort command.

15)find the meaning of userdel command.

16) Find the meaning of mkdir command.

17)find the meaning of cp command.

18)find the meaning of du command.

19)find the meaning of df command.

20)find the meaning of tail command.

21)find the meaning of head command.

22)find the meaning of bc command.

23)find the meaning of ls command.

24)find the meaning of wc command.

25)find the meaning of chmod command.

EXERCISE 2

1.create a directory india.

1.)a. Inside the india directory create two files(state and district.)/

1)b.Inside the state file add some state names.

1)c.Inside the district file add some district names.

2.Create a multiple directory .

A.Create a dirctory colleges.

B.create a directories kgcas,kct,psg,sns,snr Inside the colleges direcrory.

C.Create following directories bsc,bcom,bba,ba,msc inside the colleges sub directories.

(ex. colleges/kct/{bsc,bcom,bba,ba,msc} ).

D.Inside the all sub directories add Iyear,IIyear,IIIyear directories.

(ex. colleges/kct/bsc/I,II,III)

E.Create namelist as file inside the kgcas/bsc/IIyear directory and add your friends name.

3.Create a collaborative directory kgisl/kgcas/yourdeptname/year.

4.Create a file software add some software name.

5.Create a file hardware add some hardware name.

6.copy software file content to cpu file.

7.update hardware file content to cpu file.

8.Create a hidden-file disk and add some content.

9.Rename disk file as ram.

10.Create a encryption file linux.

A.add ******Linux is my passion****inside the file.

B.set encryption key as redhat

11.cut state file paste inside the kgcas directory.

12.Create a file sample.

13.Copy sample file to kct/bcom/IIyear

14.Move sns/bsc directory to sns/msc/IIIyear.

15.Remove the directory colleges.

EXERCISE 3

1.Copy /etc/passwd file to backup file.

2.Search the word "daemon" in the file..

3.Find the word "daemon" and replace it to "your name"..

4.Set line number to backup file..

5.Find the word bin and replace it to KGiTFS in backup from line numbers 50 to 75..

6.Copy a word game paste into linenumber 100..

7.Make 150th line as a new command line and add good morning ..

8.Copy the lines 25 to 39 paste into last line of the file..

9.Move the cursor to 35th line..

10.Create a script file and add the Following commands inside the file.( your filename should be test.sh).

Note: (add-- the following comands :cal -3 whioam "date +%A" to test.sh file>..

11.execute the file..

12.Send correct output to student1 file..

13.Send the error to student2 file..

14.Send All Output to student3 file..

EXERCISE 4

1.copy /etc/passwd file to passwd file..

2.To View the passwd file by page by page..

3.cut first field of passwd file.

4.cut 1st,4th,6th fields of passwd file..

5.search your user login name inside the passwd file and send that output to sample file..

6. view passwd file output in ascending order for 1st 25 lines..

7. view passwd file output in descending order for last 10 lines..

8.Create a file num1 and add some numbers..

9.view the output of num1 file in descending order..

10. Change the file content of passwd file from lower case to upper case..

11. Change the sample file content from lower case to upper case..

12.Display the lines starting with the word 'root'..

13.View Last 3 lines of the passwd file and send that output to doc1 file..

14.cut first field of passwd file and Display the First 5 lines and send the output to doc2 file..

15. Find the word 'daemon' and replace to 'kgisl' insdie the doc2 file..

16.Find current loging user list,in that list search your department.

17.Use cat command to print passwd file,in that output print last 5 lines.

18.Searach your userlogin_name in passwd file send the output to output1 file.

19.Cut 1St and 3rd field of passwd file,in that output sarch your user deparment.

20.List 1st 20 lines of passwd file, and cut 1st field,send the output to userlist file.

21.View userlist file in ascending order and descending order.

22.List 1st 20 lines of passwd file, and cut 3rd filed,send the output to userid file.

23.View userid file in ascending order and descending order.

24.Sort the 3rd field of passwd with ascending order.

EXERCISE 5

1) Create new user yourdept_year_yourname.

2) Set the password for the user "yourdept_year_yourname" password is same username..

3) To login the new user.

4) How to find the home directory.

5) How to list all the users.

6) How to display your username..

7) How to display your username in passwd file.

8) How to display your username in shadow file.

9) How to display your username in group file.

10)To create nologin user account Dept_yourname..

11)To Set Empty Password to that user..

12) How to find user shell type..

13) How to change user shell type nologin to login..

14)How to change user shell type login to nologin..

15)To Delete the user yourdept_year_yourname..

EXERCISE 6

1) Create a user admin_yourname
2)Create a user guset_yourname
3) Create a nologin user test_yourname
4)All user having same username as password
5)change user shell type login to nologin for guest_yourname
6)Login to admin_yourname
7)Create a directory linux
8)Set full rights to linux directory.
9)set 755 permission to /home/admin_yourname directory.
10)change nologin to login shell for test_yourname user.
11)login as test_yourname
12)create a namelist file insdie the /home/admin_yourname/linux
13)Use UGO Method:
A) Add write Perminission to user group and others
B) Remove right permission to group and others
14) cut 7th column of /etc/passwd file send the output to shell file.
15) cut 1st column of /etc/passwd file send the output to userlist file.
16)Sort the userlist file.
17) find no.of user in userlist file.
18)cut 3rd column of /etc/passwd file send the output to number file.
19)sort the number.
20)delete the user account
a)admin_yourname
b)guest_yourname
c)test_yourname
EXERCISE 7

1)Create one new group..

2)How to find the group information..

3)Add minimum 5 new user's inside the group..

4)How to list the user in which group.

5)Add 5 existing user's inside the group.

6)How to list the users in a particular group.

7)How to remove the user from group?.

8)How to conform the deletion ..

9)Add number of user's using script..

10)Add members inside the group using script..

EXERCISE 8

1)To Create a directory database..

2)To list the default permission for that directory..

3)To set full permission to that directory..

4)To list the permission for that directory..

5)To give rwx(read,write,execute) to only for user not for group and others..

6)To set read permission to group for that directory..

7)Give read and execute permission to your home director for others..

8)Chage the owner harry to the file text..

9)Change the groupowner kgcas to the file text..

10)create a file oracle set 666 permission to that file..

11)chage the permission to oracle file owner and group have rwx(read,write,execute) others having only read..

EXERCISE 9

1) How to list the user jobs?.

2) How to set new job to create a new directory(Cron) ..

3) After 5 minutes from the current time have to create a one directory as yourname..

4) Every 5th,10th & 15th date have to copy the /etc/passwd file to cron directory.

5) Every 05 minutes have to take backup of your home directory using tar command.

6) What are the commands used from Morning 09:00am to 11:00am take that command's backup to backuphistory file..

7) How to list the user jobs?.

8) How to delete the second job?.

9) How to remove all the jobs?.

10) Create multiple users using cronjob.

11) How to create a group using cronjob.

12) How to add the users to the group using cronjob.

13) How to delete all data from your login for every 1hour using cronjob..

14) use cronjob to cut 1st field of passwd file for every month of 15th day..

15)How to delete multiple users using cronjob..
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.