0% found this document useful (0 votes)
28 views6 pages

HPC Lab Manual P2-Compressed

The document outlines a practical exercise for B. Tech 4th year students at Parul University, focusing on basic Linux commands. It includes commands for navigating the file system, managing files and directories, and viewing system information, along with examples for each command. The conclusion emphasizes the importance of these command-line operations in High Performance Computing environments.
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)
28 views6 pages

HPC Lab Manual P2-Compressed

The document outlines a practical exercise for B. Tech 4th year students at Parul University, focusing on basic Linux commands. It includes commands for navigating the file system, managing files and directories, and viewing system information, along with examples for each command. The conclusion emphasizes the importance of these command-line operations in High Performance Computing environments.
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/ 6

PARUL UNIVERSITY FACULTY OF ENGINEERING & TECHNOLOGY

SUBJECT: High Performance Computing Laboratory


SUBJECT CODE: 303105356
B. TECH 4th YEAR

PRACTICAL – 2
AIM: Demonstrate basic Linux Commands.

1. pwd
• Prints the current working directory. Useful to know where you are in
the file system.

2. ls
• Lists the contents of the current directory such as files and folders.

3. cd
• Changes the directory. Example: cd /content/hello moves you into that
folder.

4. mkdir
• Creates a new directory. Example: mkdir hello creates a folder named
“hello”.

ENROLLMENT NO: 2203031310012 Page | 4


PARUL UNIVERSITY FACULTY OF ENGINEERING & TECHNOLOGY
SUBJECT: High Performance Computing Laboratory
SUBJECT CODE: 303105356
B. TECH 4th YEAR

5. rmdir
• Removes an empty directory. Example: rmdir hello deletes the folder if
it’s empty.

6. rm
• Deletes files or folders. Example: rm file.txt deletes file.txt.

7. cp
• Copies files or folders. Example: cp file.txt file2.txt makes a copy.

8. mv
• Moves or renames files. Example: mv file2.txt newFile.txt renames a file.

ENROLLMENT NO: 2203031310012 Page | 5


PARUL UNIVERSITY FACULTY OF ENGINEERING & TECHNOLOGY
SUBJECT: High Performance Computing Laboratory
SUBJECT CODE: 303105356
B. TECH 4th YEAR

9. touch
• Creates a new empty file. Example: touch file.txt.

10. cat
• Displays the content of a file. Example: cat file.txt shows what’s inside.

11. echo
• Prints text to the terminal. Example: echo Hello World.

12. head
• Displays the first 10 lines of a file. Useful for quickly previewing data.

ENROLLMENT NO: 2203031310012 Page | 6


PARUL UNIVERSITY FACULTY OF ENGINEERING & TECHNOLOGY
SUBJECT: High Performance Computing Laboratory
SUBJECT CODE: 303105356
B. TECH 4th YEAR

13. tail
• Shows the last 10 lines of a file. Often used to monitor logs.

14. wc
• Counts lines, words, and characters in a file. Example: wc htfile.txt.

15. grep
• Searches for a specific pattern in a file. Example: grep “1” htfile2.txt.

16. find
• Searches for files and directories. Example: find . -name "*.txt" finds all
text files.

ENROLLMENT NO: 2203031310012 Page | 7


PARUL UNIVERSITY FACULTY OF ENGINEERING & TECHNOLOGY
SUBJECT: High Performance Computing Laboratory
SUBJECT CODE: 303105356
B. TECH 4th YEAR

17. chmod
• Changes file permissions. Example: chmod 755 htfile2.txt.

18. whoami
• Displays the current logged-in user. In Colab, this will usually be root.

19. uname -a
• Shows system information including kernel version, system name, etc.

20. top
• Displays a real-time view of system resource usage like CPU, memory,
and running tasks.

ENROLLMENT NO: 2203031310012 Page | 8


PARUL UNIVERSITY FACULTY OF ENGINEERING & TECHNOLOGY
SUBJECT: High Performance Computing Laboratory
SUBJECT CODE: 303105356
B. TECH 4th YEAR

Conclusion
In this experiment, we successfully explored and executed fundamental Linux
commands using Google Colab. We learned how to navigate the file system,
manage files and directories, and view system information directly within a
cloud-based environment. Additionally, we demonstrated file-handling
commands like head and tail by creating and analyzing a sample text file. This
practical exercise helped reinforce our understanding of command-line
operations, which are essential for High Performance Computing (HPC)
environments, system automation, and scripting.

ENROLLMENT NO: 2203031310012 Page | 9

You might also like