Search This Blog

Sunday, October 1, 2023

Basic Linux commands

How to create a file

    touch filename

    Explanation: touch used to create a file 

How to create multiple files at a time

    touch Math's Physics Chemistry Social

    touch file {1..1000}

    Explanation : We can create multiple files at a time 

    It will create 1000 files at a time in the current directory

Command to display the contents of the file

    cat filename

    cat -n filename

    cat -b filename

    Explanation: It will display from beginning of the line to end of the line forward direction 

    -n flag is will give you the line number 

    -b flag will give you line numbers only for non-blank lines

Command to display form end of the file to beginning of the file 

    tac filename 

    Explanation : It will display from end of the file to beginning of the file 

Redirecting the output of the command to a file

    cat file > output.text

    Explanation: file content is redirected to the output.text

Command to appending the content 

    cat filename >> output.text 

    Explanation: It will to the end of the line

No comments:

Post a Comment

What is the sanity checks you have done for STA?

 Sanity checks for STA: Linking Checks: We need to check., is there any missing modules or missing pins in a library. this is done by link c...