90DaysOfDevops

90DaysOfDevops

Day-3 Task

  • To view what's written in a file.

There are 3 ways to view what's written in a file.

Command--> cat filename

nano filename

vim filename

  • To change the access permissions of files.

if you run ls -l, it will show the permissions, owner, size, and last modified date for each file in the directory.

Chmod: This command is used to change the access permissions of files and directories.

For example: Following “chmod” command will give the user permission to read, write and execute a file.

Article content

  • To check which commands you have run till now.

you just need to use a command i.e history

Article content

  • To remove a directory/ Folder.

There are 2 ways which i know rmdir directoryname or rm -r directoryname

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

There are 3 ways or Commands to create and view the content

For Creation For Viewing

touch fruits.txt cat fruits.txt

nano fruits.txt nano fruits.txt

vim fruits.txt vim fruits.txt

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

for adding content in Devops.txt i used nano file editor

for example nano Devops.txt this command will open the file then simply add the content like : Apple, Mango, Banana, Cherry, Kiwi, Orange, Guava

after adding content press ctrl+x then Y for yes it will save the file and then hit Enter.

Article content

  • To Show only top three fruits from the file.

Command ---> head -3 filename

for example head -3 Devops.txt

Article content

  • To Show only bottom three fruits from the file.

Command ----> tail -3 filename

for example tail -3 Devops.txt

Article content

  • To create another file Colors.txt and to view the content.

i use again nano command for ex-. nano colors.txt

for view the content cat colors.txt

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

i use again nano command for ex - nano colors.txt and enter the content

Article content

  • To find the difference between fruits.txt and Colors.txt file.

Solution --> diff fruits.txt Colors.txt

Article content




To view or add a comment, sign in

More articles by Ravi Srivastava

  • Monitoring & Observability

    💡 Introduction to Observability Observability is the ability to understand the internal state of a system by analyzing…

  • 🚀 Deploying an Application on GCP Cloud Run: A Step-by-Step Guide

    🚀 Just Published! 🚀 I recently deployed an application on GCP Cloud Run, and I’ve documented the entire process in my…

  • Deploying an AWS Virtual Machine with Terraform: A Step-by-Step Guide

    Introduction Terraform is an open-source infrastructure as code (IaC) tool that allows you to define and provision data…

  • Mastering Docker: Concepts, Architecture, and Installation Guide

    What is Docker? Docker is a containerization platform that provides easy way to containerize your applications, which…

  • Introduction to Containers

    A container is a standard unit of software that packages up code and all its dependencies so the application runs…

  • Kubernetes Cluster Architecture

    Our Kubernetes cluster is structured into two main sections: Master Node (Control Plane) 🖥️ API Server 🛠️ Scheduler…

    1 Comment
  • Summary Zero to Hero Batch-6, Day-4!

    🚀 Hello Connections, TWS-Community, and Techies! Excited to share insights from Zero to Hero Batch-6, Day-4. Today's…

  • Day-2 Task: Basic Linux Commands

    Check your present working directory. Command: pwd 2.

  • Introduction-Day1

    What is DevOps? Its not a method or technology, its a Culture in which you need set of practices, principles that aim…

  • LinkedIn Profile Building Challenge

    I am very excited to start my journey to upskilling myself with Shubham Londhe TrainWithShubham and TWS community. I am…

Others also viewed

Explore content categories