2 comments:

  1. . linux commands with thier outputs:
    1) pwd command- prints the absolute path to current working directory.
    $ pwd
    /home/pooja
    2) cal command- Displays the calendar of the current month.
    $ cal
    November 2018
    Su Mo Tu We Th Fr Sa
    1 2 3 4 5 6 7
    8 9 10 11 12 13 14
    15 16 17 18 19 20 21
    22 23 24 25 26 27 28
    29 30
    3) echo command- This command will echo whatever you provide it.
    $ echo "linoxide.com"
    linoxide.com
    4) date command- Displays current time and date.
    $ date
    Fri Jul 6 01:07:09 IST 2012
    5) tty command- Displays current terminal.
    $ tty
    /dev/pts/0
    6) whoami command- This command reveals the user who is currently logged in.
    $ whoami
    pooja
    7) mkdir command- To create a directory, the ‘mkdir’ command is used.
    $ mkdir example
    $ ls -l
    total 4
    drwxr-xr-x 2 pooja pooja 4096 2012-07-06 14:09 example
    8) stat command- To check the status of a file. This provides more detailed information about a file than ‘ls -l’ output.
    $ stat usrcopy
    File: `usrcopy'
    Size: 491 Blocks: 8 IO Block: 4096 regular file
    Device: 808h/2056d Inode: 149452 Links: 1
    Access: (0644/-rw-r--r--) Uid: ( 1000/ raghu) Gid: ( 1000/ raghu)
    Access: 2012-07-06 16:07:06.413522009 +0530
    Modify: 2012-07-06 16:02:30.204152386 +0530
    Change: 2012-07-06 16:17:18.992559654 +0530
    9) cat command- The 'cat' command is actually a concatenator but can be used to view the contents of a file.
    $ cat /etc/passwd
    root:x:0:0:root:/root:/bin/bash
    daemon:x:1:1:daemon:/usr/sbin:/bin/sh
    bin:x:2:2:bin:/bin:/bin/sh
    sys:x:3:3:sys:/dev:/bin/sh
    sync:x:4:65534:sync:/bin:/bin/sync
    games:x:5:60:games:/usr/games:/bin/sh
    10) tail command- Similar to ‘head’; the ‘tail’ command shows the last 10 lines by default, and -n option is available as well.
    $ tail -n 4 /etc/passwd
    raghu:x:1000:1000:Raghu Sharma,,,:/home/raghu:/bin/bash
    sshd:x:113:65534::/var/run/sshd:/usr/sbin/nologin
    dictd:x:114:123:Dictd Server,,,:/var/lib/dictd:/bin/false
    mysql:x:115:124:MySQL Server,,,:/nonexistent:/bin/false
    11) wc command- Word count
    This command counts lines, words and letters of the input given to it.
    $ wc /etc/passwd
    35 57 1698 /etc/passwd
    12) grep command- The ‘grep’ command searches for a pattern in a file (or standard input). It supports regular expressions. It returns a line if it matches the pattern in that line. So, if we wish to find the lines containing the word ‘nologin’, we use ‘grep’ as follows:
    $ grep nologin /etc/passwd
    sshd:x:113:65534::/var/run/sshd:/usr/sbin/nologin

    ReplyDelete
  2. LINUX COMMANDS

    1). ls : The is command is used for viewing file, folder and direction.
    2). cd : The cd command - change directory -will allow the user to change between file directories.
    3). mv: The mv command move- allow a user to move a file to another folder or direction.
    4).man: The man command the manual command is used to show the manual of the inputed command the man command is meta command.
    5). mkdir: The mkdir make directory command allow the user to make a new directory .just like new direction within the pc or mac desktop.
    6). rmdir:The rmdir command remove directory command allow the user to remove an existingcommand using the Linux cli.
    7). touch:The touch command a.k.a the make file command allow users to make file file using the Linux cli. the touch command make empty file.
    8).rm:The rm command remove like the rmdir command is meants to remove file from your Linux os .rm command will delete created file .
    9).locate: The locate command a.k.a find command is meant of find a file within the Linux os. you don't know the name of a certain file or you aren't sure where the file save and stored, the locate command come in handy . locate-I red* house**city*.
    10).clear: The clear command clear the screen and wipes the board clean.to use the clear command simply type clear.

    ReplyDelete