- Create the following directory structure.
hello
├── five
│ └── six
│ ├── c.txt
│ └── seven
│ └── error.log
└── one
├── a.txt
├── b.txt
└── two
├── d.txt
└── three
├── e.txt
└── four
└── access.log
hello, one, two, three, four, five, six and seven are directories. The remaining items are empty files.
-
Print the locations of all the
txtfiles inhelloand its subdirectories. -
Delete all the files with the
.logextension. -
Add the following content to
a.txt
Unix is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, development starting in the 1970s at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and others.
-
Compress the
hellodirectory into azipfile -
Copy all the
contentsofhellointo another directory calledworld -
Delete the
hellodirectory
-
Download the contents of "Harry Potter and the Goblet of fire" using the command line from https://raw.githubusercontent.com/bobdeng/owlreader/master/ERead/assets/books/Harry%20Potter%20and%20the%20Goblet%20of%20Fire.txt
-
Print the first three lines in the book
-
Print the last 10 lines in the book
Use pipes to solve the following problems:
Refer
- https://swcarpentry.github.io/shell-novice/04-pipefilter/index.html
- https://ryanstutorials.net/linuxtutorial/piping.php
- https://www.geeksforgeeks.org/piping-in-unix-or-linux/
to learn about pipes
-
How many times do the following words occur in the book?
- Harry
- Ron
- Hermione
- Dumbledore
-
Print lines from 100 through 200 in the book
-
How many unique words are present in the book?
- List your browser's process ids (pid) and parent process ids(ppid)
- Stop the browser application from the command line
- List the top 3 processes by CPU usage.
Use apt (Ubuntu) or homebrew (Mac) to:
- Install
git,vimandnginx - Uninstall
nginx
- What's your local ip address?
- Find the ip address of
google.com - Where is the
pythoncommand located? What aboutpython3?