Tutorials Hut

  • Unix For Testers

       Introduction to Unix
       Unix System Architecture
       Unix File System Structure
       Absolute and Relative Path
       Basic Unix Commands
       cal command in Unix
       who command in Unix
       date command in Unix
       clear command in Unix
       more command in Unix
       whoami command in Unix
       uname command in Unix
       man command in Unix
       echo command in Unix
       Unix File System Commands
       ls command in Unix
       cat command in Unix
       cp command in Unix
       mv command in Unix
       pwd command in Unix
       cd command in Unix
       mkdir command in Unix
       rmdir command in Unix
       rm command in Unix
       touch command in Unix
       dirname command in Unix
       tar command in Unix
       Unix Links(ln)
       Hard Link
       Soft Link
       Regular Expressions
        Basic Regular Expressions
       Interval Regular Expressions
       Pipes and Filters
       Unix Text Processing Commands
       cmp command in Unix
       diff command in Unix
       comm command in Unix
       cut command in Unix
       Paste command in Unix
       head command in Unix
       tail command in Unix
       wc command in Unix
       sort command in Unix
       grep command in Unix
       Process Related Command
       top command in Unix
       ps command in Unix
       nice command in Unix
       Kill command in Unix
       nohup command in Unix
       time command in Unix
       File Tranfer Commands in Unix
       file transfer using scp command
       file transfer using rlogin command
       file transfer using telnet command
       ssh(Secure Shell) command in Unix
       ftp file transfer command
       sftp file transfer command
       chmod command in Unix
       File Permission and File Security in Unix



  • Basic Unix Commands

    A quick guide to learn Unix basic commands that are used while working with Unix system with syntax.

    Basic Unix commands covered in this topic are:

    The Unix operating system is case sensitive. All commands must be typed in lower-case letters unless noted otherwise.

    cal command in Unix

      •  calendar command is used to see the calendar of a specific month or a whole year.
    Syntax:
    cal [options] [arguments]

     Example: cal [ [ month ] year]

    Command

    Use

    cal
    Shows current month calendar on the terminal
    cal DD YYYY
    Shows calendar of selected month and year.
    cal YYYY
    Shows the whole calendar of the year.
    cal -1
    Shows current month calendar
    cal -s
    Displays Sunday as the first day of the week
    cal -m
    Displays Monday as the first day of the week
    cal -3
    Shows calendar of previous, current and next month

            who command in Unix

      •  Displays the information about currently logged in users on the system.
    Syntax
    who [options] 

    The output is displayed in format: < Logged in Time>

    Command

    Use

    who
    displays the following information for each user currently logged in to the system
    who -m -H
    displays host name and user associated with standard input 
    who -a
    display all details of current logged in user
    who -b
    displays the time of the last system boot
    who -q
    displays all login names and number of users logged on

     

    date command in Unix

      • Displays system date and time
    Syntax:
     date [OPTION] [+FORMAT]
     date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]
      • date (no option) : With no options, the date command displays the current date and time, including the abbreviated day name, abbreviated month name, day of the month, the time separated by colons, the time zone name, and the year.
        •  -u option displays time in GMT
        • -d option can be used to display the date in a custom formatted way.

    Use the below option:

    date + “%a %d %b %Y”

    %a – Abbreviated week day name(Example: Mon)

    %d –  Day of the Month(Eg. : 12)

    %b – Abbreviated month name(Eg. : Mar)

    %Y- year

    Similarly various options can be used with date command to get custom date output.

           clear command in Unix

      • Clears the screen.
    Syntax:
    clear

         more command in Unix

      • Allows page-wise display
    Syntax:
    more [files]

         whoami command in Unix

      •  Displays username
    Syntax:
    whoami

    uname command in Unix

        •  Displays system information (kernel name, version, operating system, processor, machine hardware name, etc)
    Syntax:
    uname
        •  -a option displays all information

           man command in Unix

        •  This displays online documentation , display the user manual of any command that we can run on the terminal
    Syntax:
    man [command]

           echo command in Unix

        • Echo’s to the screen whatever you type after echo.
        • It is useful for producing diagnostics in command files, for sending known data into pipe, and for displaying contents of environment variables
    Syntax:
    echo[Option] 
    Command Use
    echo -e
    Enables interpretation of backslash escapes
    echo -E
    Disable the interpretation of backslash escapes.
    echo -n 
    Do not output the trailing newline.

    Unix Shortcuts and other basic unix commands:

    Below are the set of some commonly used shortcuts and commands that are required while working with Unix servers.

    Also refer

    Basic Unix Commands- Shortcuts
    Basic Unix Commands- Sytem Information



  • Unix For Testers

       Introduction to Unix
       Unix System Architecture
       Unix File System Structure
       Absolute and Relative Path
       Basic Unix Commands
       cal command in Unix
       who command in Unix
       date command in Unix
       clear command in Unix
       more command in Unix
       whoami command in Unix
       uname command in Unix
       man command in Unix
       echo command in Unix
       Unix File System Commands
       ls command in Unix
       cat command in Unix
       cp command in Unix
       mv command in Unix
       pwd command in Unix
       cd command in Unix
       mkdir command in Unix
       rmdir command in Unix
       rm command in Unix
       touch command in Unix
       dirname command in Unix
       tar command in Unix
       Unix Links(ln)
       Hard Link
       Soft Link
       Regular Expressions
        Basic Regular Expressions
       Interval Regular Expressions
       Pipes and Filters
       Unix Text Processing Commands
       cmp command in Unix
       diff command in Unix
       comm command in Unix
       cut command in Unix
       Paste command in Unix
       head command in Unix
       tail command in Unix
       wc command in Unix
       sort command in Unix
       grep command in Unix
       Process Related Command
       top command in Unix
       ps command in Unix
       nice command in Unix
       Kill command in Unix
       nohup command in Unix
       time command in Unix
       File Tranfer Commands in Unix
       file transfer using scp command
       file transfer using rlogin command
       file transfer using telnet command
       ssh(Secure Shell) command in Unix
       ftp file transfer command
       sftp file transfer command
       chmod command in Unix
       File Permission and File Security in Unix

















  • Leave a Reply

    Your email address will not be published. Required fields are marked *