Skip to main content

Command Palette

Search for a command to run...

Day3 #90daysofdevops Challenge

In this blog we'll learn how we can drive certain tasks in Linux using shell:

Published
•1 min read•View as Markdown
Day3 #90daysofdevops Challenge
A

I'm a DevOps enthusiast with a passion for learning and using the latest tools to streamline development and deployment workflows. From containerization to automation, I'm always on the lookout for ways to make the DevOps engineer's life easier. Follow me for insights into the latest trends and tools in DevOps, as well as tips and tricks for optimizing your workflows.

To view what's written in a file.

cat filename

To change the access permissions of files.

chmod

To check which commands you have run till now.

history

.

.

To remove a directory/ Folder.

rmdir directoryname

To create a fruits.txt file and to view the content.

touch fruits.txt

cat fruits.txt

Add content in fruits.txt (One in each line) - Apple, Mango, Banana, Cherry, Kiwi, Orange, Guava

cat >> fruits.txt

Apple

Mango

Banana

Cherry

Kiwi

Orange

Guava

ctrl + d

Show only the top three fruits from the file.

head -3 fruits.txt

Show only the bottom three fruits from the file.

tail -3 fruits.txt

To create another file colors.txt and to view the content.

touch colors.txt

cat colors.txt

Add content in colors.txt (One in each line) - Red, Pink, White, Black, Blue, Orange, Purple, Grey

cat >> colors.txt

Red

Pink

White

Black

Blue

Orange

Purple

Grey

ctrl + d

To find the difference between the fruits.txt and colors.txt file

diff fruits.txt colors.txt

More from this blog

Amrendra's blog

30 posts