Linux Assignment ‐2 - sayanbhattacharya1234/Oracle_DBA GitHub Wiki

1. Run a command to display your current working directory path.

2. Move to /etc and verify your location.

3. Change your directory from /etc to /usr/bin and confirm using pwd.

4. Move one level up from your current directory.

5. Return to your home directory from anywhere in the filesystem using a single command.

6. List all files and directories (including hidden ones) in your home directory.

7. Display files in long format, showing file permissions, size, and date.

8. List all files in /var/log sorted by modification time, with the newest first.

9. Create a directory named backup_files inside home directory.

10. Create a nested directory structure home directory/projects/java/src in a single command.

11. Create three empty files: log1.txt, log2.txt, and log3.txt in the current directory.

12. Update the modification timestamp of log1.txt without changing its contents.

13. Display the content of the file /etc/oratab on the terminal.

14. Combine the content of part1.txt and part2.txt into a new file named final.txt.

15. Count the number of lines, words, and characters in a file named /var/log

16. Display only the number of lines in /etc/services.

17. Find all lines containing the word “error” inside /var/log.

no idea

18. Search recursively for the keyword “error” inside /var/log.

19. Count how many times the word “failed” appears in auth.log.

no idea

20. Copy a file named part1.txt from home location to /backup /.

21. Copy an entire directory /scripts (including its contents) to /backup/scripts/.

22. Rename the file part1.txt to data_old.txt.

23. Move all .txt files from home directory tohome directory/backup.

24. Display the full calendar for the year 2026.

25. Show the calendar for the current month along with the previous and next month.