0% found this document useful (0 votes)
5 views2 pages

Life Long Learning Lab Exam1 Questions

Uploaded by

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

Life Long Learning Lab Exam1 Questions

Uploaded by

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

1.

Linux commands:

1.echo SRM ➔ to display the string SRM


2. clear ➔ to clear the screen
3. date ➔ to display the current date and time
4. cal 2003 ➔ to display the calendar for the year 2003
cal 6 2003 ➔ to display the calendar for the June-2003
5. passwd ➔ to change password

6. ls ➔ list files in the present working directory


ls –l ➔ list files with detailed information (long list)
ls –a ➔ list all files including the hidden files

7. cat > f1 ➔ to create a file (Press ^d to finish typing)

8. cat f1 ➔ display the content of the file f1

9. wc f1 ➔ list no. of characters, words & lines of a file f1


wc –c f1 ➔ list only no. of characters of file f1
wc –w f1 ➔ list only no. of words of file f1
wc –l f1 ➔ list only no. of lines of file f1

10. cp f1 f2 ➔ copy file f1 into f2

11. mv f1 f2 ➔ rename file f1 as f2

12. rm f1 ➔ remove the file f1

13. head –5 f1 ➔ list first 5


lines of the file f1
tail –5 f1 ➔ list last 5 lines of the file f1

14. mkdir elias ➔ to create the directory elias


15. cd elias ➔ to change the directory as elias
16. rmdir elias ➔ to remove the directory elias

17. pwd ➔ to display the path of the present working directory

18. cd ➔ to go to the home directory


19.cd .. ➔ to go to the parent directory
20.cd - ➔ to go to the previous working directory
21.cd / ➔ to go to the root directory

Programs:
1.Write a Shell program to check whether the file has execute permission or not. If not,
add the permission.
2. Write a Shell program to find the sum of N numbers?
3. Write a program to check all the files in the present working directory for a pattern
(passed through command line) and display the name of the file followed by a
message stating that the pattern is available or not available.
4.Write a Shell program to check whether the file has execute permission or not.
5.Write to C program to create a PROCESS using fork() system call?
6.Write a C program to print the Child process ID and Parent process ID in both Child and
Parent processes.

7.Write a C program to demonstrate A SIMPLE THREAD.

8.Write a C program to demonstrate MULTI THREADING.

You might also like