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



  • Unix System Architecture and Unix File System Structure

    The architecture of this operating system is based on a layered design and has four layers. with each layer providing a specific set of services to the layers above it. The layers are organized in a hierarchical fashion, with the lowest layer providing the most basic services and the upper layers building on these services to provide more advanced functionality. Unix system architecture consists of Hardware, Kernel, System Call interface(shell) commands and utilities, user applications etc.

    Structure in Unix has, all files are organized into directories. Files in Unix System are organized into multi-level hierarchy structure known as a directory tree.

    The Unix system architecture is based on a layered design, 

    We will learn below topics in this article:

    Unix System Architecture/ Unix structure

    A computer system contains hardware and software that controls and manage computer hardware, software resources, and Operating system required for the computer. The operating system acts as the intermediate between hardware and the user-defined application software. Unix is a multitasking, multiuser operating system.

    The software is of two types:

        • System software
        • Application software.

    The system software provides platform for other software on the computer. Application Software is user-defined software that works on the system software. An operating system is a system software.

    The  Unix system architecture is divided by into four layers.

    Major components of Unix operating System architecture are :

        • Hardware layer
        • Kernel
        • Shell
        • Commands and Utilities
        • User Applications/ Application Layer
    Unix architecture

    Hardware layer

    The lowest layer of the Unix architecture is the hardware layer, which provides the physical components of the computer, such as the CPU, memory, and disk drives. The hardware layer communicates with the operating system through device drivers, which are software modules that provide a standard interface between the hardware and the operating system.

    Unix Kernel

     Kernel is the central core of the operating system that interacts directly with the hardware of the system.

    The main functions of Kernel are:

        • Computer hardware such as memory, disc, printers are controlled by the kernel.
        • The kernel provides a set of basic services, such as process management, memory management, and input/output (I/O) management the processes, control and executes various user-defined tasks.
        • The kernel also provides a system call interface, which allows applications to interact with the operating system and access its services.
        • Manages the data storage.

    Unix Shell

    It is the interface between the user and the kernel. Users can interact with the shell using shell commands. The shell provides a command-line interface that allows users to interact with the system by entering commands and receiving responses

        • Users communicate directly with Shell. Translates user’s commands into functions understandable by Kernel
        • It interprets commands given by the users and executes them using the kernel.
        • Issues a shell prompt and waits for user response
        • Provides programming ability to the users to write shell commands .

    The shell also provides a scripting language that allows users to automate common tasks and create more complex programs.

    Commands and Utilities

    Above the shell are the system utilities, which are a collection of programs that provide additional functionality to the system. System utilities include programs for managing files and directories, networking, printing, and security. Commands used by the Unix operating system are:

        •  ‘sh’ – shell commands providing a primary user interface,
        • There are various commands and utilities which you can make use of in your day to day activities. cp, mv, cat and grep

    Application Layer

    The top layer of the Unix architecture is the application layer, which includes all the user-level programs that run on the system.

      • All the data/programs which the user writes.
      • Applications can be developed using a wide range of programming languages, including C, C++, Python, Java, and Perl.

     

    Unix File System Structure

    Files in Unix System are organized into multi-level hierarchy structure known as a directory tree. At the top of the file system is a directory called “root” which is represented by a “/”

    Unix File Structure
    • A file is a smallest unit in which the information is stored. 
    • All data in Unix is organized into files. All files are organized into directories. Unix has multiple file systems
    • A file system is a formatted partition of the disk ,group of files having relevant information 
    • There is always one compulsory file system known as the root.
    • For more information

    Features of the Unix file management system :

    • It implements a hierarchical directory structure of the file name space.
    • It implements a uniform and consistent treatment of file data and other I/O objects.
    • It implements a means of sharing file data.
    • It implements a means of protecting file data.
    • Keeps track of files using i-node numbers.
    • File access permissions can be set 3 classes of users: 
    1. File Owner  
    2. File Owner’s Group
    3. Others

    Absolute and Relative Path

    What is a Path?

    A path is a unique location to a file or a folder in a file system of an OS. A path to a file is a combination of / and alpha-numeric characters.

    What Is An Absolute Path?

    An absolute path is defined as specifying the location of a file or directory from the root directory(/). In other words absolute path is a complete path from start of the actual file system from / directory.
    Some examples of absolute path: 
    /home/base/myData/test.config /home/base/myData/queries.sql

    What Is The Relative Path?

     Relative path is defined as a path related to the present working directory(pwd).  Suppose I am located in /home/base and I want to change directory to /home/base/myData. I can use relative path concept to change directory to myData Changing directory using relative path:
    Syntax:
    $pwd /home/base $cd myData

     Change directory using absolute path:

     $cd /home/base/myData Note: We can use absolute path from any location where as if you want to use relative path we should be present in a directory where we are going to specify relative to that present working directory.
    CommandDescriptionPath
    cd ./myDataChange current directory to myDataUse relative path
    cd ..Change current directory to parent directoryUse relative path
    cd /home/base/myDataChange current directory to dir1Use absolute path



  • 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 *