Skip to main content

Command Palette

Search for a command to run...

Day 3 - Basic Linux Commands with a Twist

Updated
1 min readView as Markdown
Day 3 - Basic Linux Commands with a Twist
G

👋 Hey there! I'm Gayatri, I have completed a degree in Computer Engineering. I am extensively involved in the fields of DevOps and Cloud computing.

1) View the content of a file and display line numbers.

2) Change the access permissions of files to make them readable, writable, and executable by the owner only.

3) Check the last 10 commands you have run.

4) Remove a directory and all its contents.

5) Create a fruits.txt file, add content (one fruit per line), and display the content.

6) Add content in devops.txt (one in each line) - Apple, Mango, Banana, Cherry, Kiwi, Orange, Guava. Then, append "Pineapple" to the end of the file.

7) Show the first three fruits from the file in reverse order.

8) Show the bottom three fruits from the file, and then sort them alphabetically.

9) Create another file Colors.txt, add content (one color per line), and display the content.

10) Add content in Colors.txt (one in each line) - Red, Pink, White, Black, Blue, Orange, Purple, Grey. Then, prepend "Yellow" to the beginning of the file.

11) Find and display the lines that are common between fruits.txt and Colors.txt.

12) Count the number of lines, words, and characters in both fruits.txt and Colors.txt

More from this blog

Untitled Publication

43 posts