0% found this document useful (0 votes)
13 views11 pages

Linux PRG Final-1

Linux program

Uploaded by

Manikanta Naidu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views11 pages

Linux PRG Final-1

Linux program

Uploaded by

Manikanta Naidu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Class: 2/4 B.

Tech Branch: CSE Section: 2CSE - C Lab Name: Linux Essentials

Lab Code: 20CSL301/SO 01 RegdNo: Y23ACS559

Program: 01
1. Obtain the following results (i) To print the name of operating system (ii) To print the login name (iii)
To print the host name
2. Find out the users who are currently logged in and find the particular user too.
3. Display the calendar for (i) Jan 2000 (ii) Feb 1999 (iii) 9th month of the year 7 A.D (iv) For the current
month (v) Current Date Day Abbreviation , Month Abbreviation along with year
4. Display the time in 12-Hour and 24 Hour Notations.
5. Display the Current Date and Current Time.
6. Display the message “GOOD MORNING” in enlarged characters.
7. Display the name of your home directory.
8. Create a directory SAMPLE under your home directory.
9. Create a subdirectory by name TRIAL under SAMPLE.
10. Change to SAMPLE.
11. Change to your home directory.
12. Change from home directory to TRIAL by using absolute path.
13. Remove directory TRIAL.
14. Create a directory TEST using absolute pathname.
15. Using a single command change from current directory to home directory.
16. Remove a directory using absolute pathname.
17. Create files my file and your file under Present Working Directory.
18. Display the files my file and your file.
19. Append more lines in the file and your file files.
20. How will you create a hidden file?.
21. Copy myfile file to emp directory.
22. Write the command to create re name for a file.
23. Move yourfile file to dept directory.

24. Copy emp directory and dept directory to TRIAL directory


25. Compare a file with itself.
26. Compare myfile file and your file.

1|P ag e
Class: 2/4 B.Tech Branch: CSE Section: 2CSE - C Lab Name: Linux Essentials

Lab Code: 20CSL301/SO 01 RegdNo: Y23ACS559

1. Obtain the following results (i) To print the name of operating system (ii) To print the login name (iii)
To print the host name.
Answer:-

2. Find out the users who are currently logged in and find the particular user too.

Answer:-

3. Display the calendar for (i) Jan 2000 (ii) Feb 1999 (iii) 9th month of the year 7 A.D (iv) For the
current month (v) Current Date Day Abbreviation , Month Abbreviation along with year
Answer:-
(i) $cal Jan 2000
(Or)
$cal 1 2000
(ii) $cal Feb 1999
(Or)
$cal 2 1999

2|P ag e
Class: 2/4 B.Tech Branch: CSE Section: 2CSE - C Lab Name: Linux Essentials

Lab Code: 20CSL301/SO 01 RegdNo: Y23ACS559

(iii) $ cal 9 7
(iv)$cal
(v)

4. Display the time in 12-Hour and 24 Hour Notations.

Answer:-

5. Display the Current Date and Current Time.

Answer:-

3|P ag e
Class: 2/4 B.Tech Branch: CSE Section: 2CSE - C Lab Name: Linux Essentials

Lab Code: 20CSL301/SO 01 RegdNo: Y23ACS559

6. Display the message “GOOD MORNING” in enlarged characters.

Answer:-

7. Display the name of your home directory.

Answer:-

8. Create a directory SAMPLE under your home directory.

Answer:-

4|P ag e
Class: 2/4 B.Tech Branch: CSE Section: 2CSE - C Lab Name: Linux Essentials

Lab Code: 20CSL301/SO 01 RegdNo: Y23ACS559

9. Create a subdirectory by name TRIAL under SAMPLE.

Answer:-

10. Change to SAMPLE.

Answer:-

11. Change to your home directory.


Answer:-

12. Change from home directory to TRIAL by using absolute path.


Answer:-

5|P ag e
Class: 2/4 B.Tech Branch: CSE Section: 2CSE - C Lab Name: Linux Essentials

Lab Code: 20CSL301/SO 01 RegdNo: Y23ACS559

13. Remove directory TRIAL.

Answer:-

14. Create a directory TEST using absolute pathname.


Answer:-

15. Using a single command change from current directory to home directory.
Answer:-

6|P ag e
Class: 2/4 B.Tech Branch: CSE Section: 2CSE - C Lab Name: Linux Essentials

Lab Code: 20CSL301/SO 01 RegdNo: Y23ACS559


16.

16. Remove a directory using absolute pathname.

Answer:-

17. Create files my file and your file under Present Working Directory.
Answer:-

7|P ag e
Class: 2/4 B.Tech Branch: CSE Section: 2CSE - C Lab Name: Linux Essentials

Lab Code: 20CSL301/SO 01 RegdNo: Y23ACS559

18. Display the files my file and your file.


Answer:-

19. Append more lines in the file and your file files.
Answer:-

20. How will you create a hidden file?.

Answer:-

8|P ag e
Class: 2/4 B.Tech Branch: CSE Section: 2CSE - C Lab Name: Linux Essentials

Lab Code: 20CSL301/SO 01 RegdNo: Y23ACS559

21. Copy myfile file to emp directory.


Answer:-

22. Write the command to create re name for a file.


Answer:-

23. Move yourfile file to dept directory.


Answer:-

9|P ag e
Class: 2/4 B.Tech Branch: CSE Section: 2CSE - C Lab Name: Linux Essentials

Lab Code: 20CSL301/SO 01 RegdNo: Y23ACS559

24. Copy emp directory and dept directory to TRIAL directory


Answer:-

25. Compare a file with itself.


Answer:-

10 | P a g e
Class: 2/4 B.Tech Branch: CSE Section: 2CSE - C Lab Name: Linux Essentials

Lab Code: 20CSL301/SO 01 RegdNo: Y23ACS559

26. Compare myfile file and your file.


Answer:-

11 | P a g e

You might also like