Code Monkey home page Code Monkey logo

linux's Introduction

Linux

In this repository we will learn about Linux commands. For using and implimenting those command open your linux command and press esc button from your computer and enter vi then enter file_name.sh. Now you will redirect into mention fill now pressesc + a for writing command. Now after complet writting progrma press esc + : + wq now you will againg redirec to main command prompt. Now for running this file press sh file_name.sh it will run whole commands of the file. Practice all code in vi editor. โš  Please read all the commands very carefully and write it using appropriate spaces and signs.

Linux Commands

  • pwd this command is used to check you are present in which directory
  • mkdir DirectoryName it use to create Directory.
  • rmdir or rm -d used to remove empty directory.
  • rm -r to delete directory that contain sub-directory and file.
  • ls it shows the files/directories in your current directory.
  • ls -R to shows all the files not only in directories but also subdirectories.
  • ls -al gives detailed information of the files.
  • ls -a used to see hiden files (example of hiden files start with a .).
  • cat > filename use to create file and after creating write something in that file.
  • After writing the content press ctrl + d to save the file and return to command.
  • cat filename use to see the content of file.
  • cat file1 file2 > file3 command is used to combine files in to a new file.
  • You can merge more than two file using same command
  • rm filename command is used to remove file from system without confirmation.
  • mv filename directoryname command is used to move file from one directory to another
  • cd directoryname command is used to enter in any directory.
  • cd command is used to come back to previous directory.
  • cat > filename use to create file
  • ctrl + d use to save the file and return to command
  • cat filename use to see file details
  • cat file1 file2 > file3 use to combine files in to a new file.
  • rm filename used to remove file from system without confirmation.
  • nano filename use to edit existing file
  • echo "any thing" use to print
  • read variable_name use to store value in a particular variable
  • echo $variable_name use to print assigned value of the variable
  • expr $variable1 + $variable2 use to print expretion command
  • vi filename.sh use to open filename.sh in editor
  • sh filename.sh use to run filename.sh
  • :wq this command is used to exit from vi editor (if you are in editor moder then first use esc)
  • insert or shift + 0 use to enable edit mode in vi editor
  • function() {your shell} function used to create function (yous curli braces in another line not in same line and end function is calling function).
  • function() {"// your code $1 $2" return xy} function vagabon 09 here $1 $2 are paremater and vagabon 09 are passing parameter to function and return is returning parameter.
  • function() { your shell script $1 $2} next line function a b next line ret=$? in this way we can get values that passing by the function

Assignments

Assignment1

linux's People

Contributors

ritik2611 avatar vagabon-09 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

ritik2611

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.