Created
November 3, 2020 19:31
-
-
Save codebubb/0c031f7dabcaf0de7bbdaf0fca8b43a2 to your computer and use it in GitHub Desktop.
Command Line Exercises
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pipes--- | |
1.Download the contents of "Harry Potter and the Goblet of fire" using the command line from here | |
wget https://raw.githubusercontent.com/bobdeng/owlreader/master/ERead/assets/books/Harry%20Potter%20and%20the%20Goblet%20of%20Fire.txt | |
1. Print the first three lines in the book | |
2.Print the last 10 lines in the book | |
3. How many times do the following words occur in the book? | |
4.Print lines from 100 through 200 in the book | |
5. How many unique words are present in the book? | |
Processes, ports------ | |
1-List your browser's process ids (pid) and parent process ids(ppid) | |
2-Stop the browser application from the command line | |
3- List the top 3 processes by CPU usage. | |
4- List the top 3 processes by memory usage. | |
5-Start a Python HTTP server on port 8000 | |
6- Open another tab. Stop the process you started in the previous step | |
open another tab :- | |
stop process:- | |
7-Start a Python HTTP server on port 90 | |
8- Display all active connections and the corresponding TCP / UDP ports. | |
9- Find the pid of the process that is listening on port 5432 | |
start server:- | |
find pid :- | |
stop server:- | |
Managing software------ | |
1- Install htop, vim and nginx | |
2- Uninstall nginx | |
Misc---------- | |
1- What's your local IP address? | |
2- Find the IP address of google.com | |
3- How to check if Internet is working using CLI? | |
4- Where is the node command located? What about code? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment