The document provides information on various UNIX commands for file and directory management. Some key points:
- The cat command is used to create, view, and append to files. It can also be used to create multiple files at once.
- The rm command removes files and directories, including options to remove forcibly or interactively.
- The ls command lists files and directories with various options to change the output format.
- The cp command copies files between locations including options for backup and forcing overwrites.
- The mv command moves files and directories between locations with similar options to cp.
- Permissions, umask, and wildcards like ?,* are also discussed for controlling file access and
This lecture discusses a group of Utilities and Commands that will be used in the following lectures and are very useful for CLI Users and Bash Script Programmers
Check the other Lectures and courses in
http://Linux4EnbeddedSystems.com
or Follow our Facebook Group at
- Facebook: @LinuxforEmbeddedSystems
Lecturer Profile:
- https://www.linkedin.com/in/ahmedelarabawy
5_File_Handling_Commands__vi_editor_and_environment_variablesGautam Raja
This document provides a content manual for the TATA CONSULTANCY SERVICES Pre ILP – Unix LOUNGE. It contains two chapters, the first discussing basic Unix file commands like touch, cat, cp, mv, rm, and find. The second chapter covers basics of the vi text editor and environment variables. It describes vi modes, commands for navigation, editing, saving and exiting. It also explains how environment variables control the system behavior and lists some common ones like HOME, PATH, and PS1.
The document describes various Linux commands for displaying system information, manipulating files and directories, and filtering data. It provides examples of commands like date, cal, who, ls, cat, cp, mv, rm, pwd and others along with descriptions and sample outputs. Cut, paste, sort commands are described for filtering specific fields from files based on delimiters.
Per chi incomincia addentrarsi nel magico mondo dei comandi da terminale la vita può essere dura. In rete esistono diverse guide, ma la “Linux Bash Shell Cheat Sheet for Beginners” di Raphael è qualcosa che i principianti dovrebbero tenere a portata di mano. La segnaliamo un po’ perchè è molto semplice e chiara, e un po’ perchè è stata scritta da un sedicenne canadese. Personalmente è una cosa che mi fa piacere, perchè dimostra che anche i giovanissimi si accostano a linux nel modo migliore, ovvero “imparo e a mia volta diffondo”.
This document provides an overview of the Unix operating system and some basic Unix commands. It discusses the kernel and shell architecture of Unix, the multi-user and multi-process capabilities, file and directory structures including important directories like /bin, /home, and /var. It also summarizes common commands for navigating directories, viewing files, copying/moving files, and managing permissions and processes. The document is intended to help users get started with basic Unix concepts and commands.
Summary of UNIX commands used in the BTI Plant Bioinformatics Course in 2014. It includes a description of these common commands and some useful options.
This document provides a tutorial on Unix/Linux. It begins with an overview of the Unix system including the kernel, shell, multi-user and multi-process capabilities, and important directory structures. It then covers basic commands, relative and absolute paths, redirecting and piping output, permissions, process management, installing software, text editors, running jobs in the foreground and background, and remote login/file transfer. The goal is to introduce fundamental Unix concepts and commands to new users.
This lecture discusses a group of Utilities and Commands that will be used in the following lectures and are very useful for CLI Users and Bash Script Programmers
Check the other Lectures and courses in
http://Linux4EnbeddedSystems.com
or Follow our Facebook Group at
- Facebook: @LinuxforEmbeddedSystems
Lecturer Profile:
- https://www.linkedin.com/in/ahmedelarabawy
5_File_Handling_Commands__vi_editor_and_environment_variablesGautam Raja
This document provides a content manual for the TATA CONSULTANCY SERVICES Pre ILP – Unix LOUNGE. It contains two chapters, the first discussing basic Unix file commands like touch, cat, cp, mv, rm, and find. The second chapter covers basics of the vi text editor and environment variables. It describes vi modes, commands for navigation, editing, saving and exiting. It also explains how environment variables control the system behavior and lists some common ones like HOME, PATH, and PS1.
The document describes various Linux commands for displaying system information, manipulating files and directories, and filtering data. It provides examples of commands like date, cal, who, ls, cat, cp, mv, rm, pwd and others along with descriptions and sample outputs. Cut, paste, sort commands are described for filtering specific fields from files based on delimiters.
Per chi incomincia addentrarsi nel magico mondo dei comandi da terminale la vita può essere dura. In rete esistono diverse guide, ma la “Linux Bash Shell Cheat Sheet for Beginners” di Raphael è qualcosa che i principianti dovrebbero tenere a portata di mano. La segnaliamo un po’ perchè è molto semplice e chiara, e un po’ perchè è stata scritta da un sedicenne canadese. Personalmente è una cosa che mi fa piacere, perchè dimostra che anche i giovanissimi si accostano a linux nel modo migliore, ovvero “imparo e a mia volta diffondo”.
This document provides an overview of the Unix operating system and some basic Unix commands. It discusses the kernel and shell architecture of Unix, the multi-user and multi-process capabilities, file and directory structures including important directories like /bin, /home, and /var. It also summarizes common commands for navigating directories, viewing files, copying/moving files, and managing permissions and processes. The document is intended to help users get started with basic Unix concepts and commands.
Summary of UNIX commands used in the BTI Plant Bioinformatics Course in 2014. It includes a description of these common commands and some useful options.
This document provides a tutorial on Unix/Linux. It begins with an overview of the Unix system including the kernel, shell, multi-user and multi-process capabilities, and important directory structures. It then covers basic commands, relative and absolute paths, redirecting and piping output, permissions, process management, installing software, text editors, running jobs in the foreground and background, and remote login/file transfer. The goal is to introduce fundamental Unix concepts and commands to new users.
This document provides a summary of common Linux commands organized by category including file permissions, networking, compression/archives, package installation, searching, login, file transfer, disk usage, directory traversal, system information, hardware information, users, file commands, and process related commands. It also includes brief descriptions and examples of commands like chmod, chown, ip, tar, rpm, grep, ssh, df, du, and kill. More detailed information on Linux commands can be found at the provided URL.
This document provides an overview of basic UNIX commands and utilities for general use, performance monitoring and debugging. It discusses commands for file manipulation, permissions, searching, networking and more. Specific utilities covered include ls, cat, grep, find, top and netstat. The document also reviews UNIX concepts like HOME directories, hidden files and aliases. Examples are given for many commands.
This document provides an overview of common UNIX commands for navigating directories, listing files, editing text, searching for files and strings, compressing files, and more. It describes commands like ls, cd, pwd, vi, grep, find, tar, gzip and man for viewing manual pages. It also explains concepts like pipes, redirection, environment variables and basics of the awk command for text manipulation.
This is a document useful for one who wants to learn the Basics of UNIX command.
Targeted for fresher to the industry and new learner of UNIX command for experienced professionals too.
Hope everyone will like it.
This lecture covers the use of wild cards in Linux commands, as well as escape sequences
Check the other Lectures and courses in
http://Linux4EnbeddedSystems.com
or Follow our Facebook Group at
- Facebook: @LinuxforEmbeddedSystems
Lecturer Profile:
- https://www.linkedin.com/in/ahmedelarabawy
This document discusses Linux file permissions and ownership. It explains that Linux uses a user/group ownership model where files and directories have read, write and execute permissions for the owner, group and others. It also describes how to change permissions and ownership using the chmod and chown commands. The document provides examples of using these commands and includes a lab activity asking the user to create files, set permissions on them, and test access.
The document provides an overview of basic Linux commands organized into the following sections:
1. General purpose utilities such as date, echo, printf, calculator applications
2. Linux file system structure and commands for viewing file attributes, permissions, ownership
3. Commands for file handling, concatenation, pagination and comparing files
we need to have a good amount of basic or in-depth knowledge on Linux Basics. This will help one's job easy in resolving the issues and supporting the projects.
Are you a system admin or database admin? Or working on any other technology which is deployed or implemented on linux/UNIX machines? Then you should be good with Linux basic concepts and commands. We will cover this section very clearly.
This document provides a quick reference to useful UNIX commands organized into categories such as file commands, directory commands, symbolic links, terminal commands, help commands, and more. It includes brief descriptions and usage examples for commands like ls, cd, cp, grep, find, and others. The document is intended as a quick reference and not a replacement for manuals or books on UNIX. It recommends Unix in a Nutshell as a reference.
This document provides a summary of Linux/Unix commands organized into categories including file handling, system information, networking, process management, installation, editors, and advanced filters. It lists common commands like ls, cp, grep, ifconfig, kill, apt-get install, and vi along with brief descriptions of their functions. Advanced examples are given for commands like sed, awk, and regular expressions to manipulate text within files.
This document provides a summary of useful Linux commands for starting and stopping the system, accessing and mounting file systems, finding files and text, moving, copying, deleting, and viewing files, installing software, user administration, and the X Window System. It lists commands such as shutdown, halt, reboot, mount, umount, find, locate, updatedb, which, grep, ls, rpm, tar, adduser, passwd, su, and exit along with brief explanations of their functions.
The document discusses various Unix/Linux commands for text processing and file management. It describes the commands head, tail, tr, sort, cut, uniq, diff, tee, find, and grep. Head displays the first few lines of a file, tail displays the last few lines, and tr translates or deletes characters. Sort sorts the lines of a text file, cut removes sections from each line, and uniq removes duplicate lines from a sorted file. Diff finds differences between two files.
DNS (Domain Name System) is a hierarchical naming system that translates domain names to IP addresses and vice versa. A DNS server is a computer that runs DNS services to provide name resolution. DNS works by querying multiple levels of DNS servers, starting from the root servers, then TLD (top-level domain) servers, then authoritative name servers, to ultimately resolve domain names to IP addresses.
A command is normally entered in a line by typing from the keyboard.
Commands , options and command arguments must be seperated by white space or tabs.
Linux is an open-source operating system that can run on various hardware. The document discusses various Linux commands and concepts related to directories, files, permissions, users, groups, text editors like vi and vim, process management, disk partitioning and more. It also covers Linux installation, package management, shell scripting and configuring network and services like SSH, web servers and more. Exercises are included to help understand concepts like mount points, journaling and file attributes.
The document provides a cheat sheet for basic Unix commands. It summarizes commands for listing directories, changing directories, making directories, removing directories, copying and moving files, deleting files, downloading and uploading files, viewing files, editing files, finding files, setting permissions, and more. It also provides examples of aliases and scripts that can be created in Unix.
This document provides a list of common Unix commands along with a brief description of what each command does. It includes commands for navigating and viewing files, editing text, finding and manipulating text, compressing and archiving files, remote access, printing, and more. The summary at the end highlights some frequently used commands for listing users, viewing directories, viewing parts of files, managing processes, text editing, disk usage, searching text, and remote access.
Unix 1st sem lab programs a - VTU KarnatakaiCreateWorld
This document contains code for several shell scripting exercises:
1. Lab1a accepts command line arguments and prints them in reverse order.
2. Lab1b checks if two file permissions are identical, printing the common permission or each file's individual permissions.
3. Lab2b creates all directories in a path if they don't exist.
4. Lab9b counts and reports the occurrences of words from the first argument file that are present in other argument files.
Course 102: Lecture 3: Basic Concepts And Commands Ahmed El-Arabawy
This lecture covers the basic file management commands
Check the other Lectures and courses in
http://Linux4EnbeddedSystems.com
or Follow our Facebook Group at
- Facebook: @LinuxforEmbeddedSystems
Lecturer Profile:
- https://www.linkedin.com/in/ahmedelarabawy
This document provides an overview of basic Linux file management commands like cp, mv, rm, mkdir and touch. It discusses using cp to copy files and directories, mv to move and rename files, rm to remove files and directories, mkdir to create directories and touch to update file timestamps. It also covers using find to search for files based on criteria like name, size, permissions and timestamps.
This document provides an overview of basic Linux commands for navigation, listing directories, reading and manipulating files. It explains commands like pwd, cd, ls, cat, cp, mv, rm, mkdir to change directories, list files, read files, copy, move and delete files/directories. It also introduces the vi editor for creating new files and mentions some other miscellaneous commands like date, chmod, user management tools.
This document provides a summary of common Linux commands organized by category including file permissions, networking, compression/archives, package installation, searching, login, file transfer, disk usage, directory traversal, system information, hardware information, users, file commands, and process related commands. It also includes brief descriptions and examples of commands like chmod, chown, ip, tar, rpm, grep, ssh, df, du, and kill. More detailed information on Linux commands can be found at the provided URL.
This document provides an overview of basic UNIX commands and utilities for general use, performance monitoring and debugging. It discusses commands for file manipulation, permissions, searching, networking and more. Specific utilities covered include ls, cat, grep, find, top and netstat. The document also reviews UNIX concepts like HOME directories, hidden files and aliases. Examples are given for many commands.
This document provides an overview of common UNIX commands for navigating directories, listing files, editing text, searching for files and strings, compressing files, and more. It describes commands like ls, cd, pwd, vi, grep, find, tar, gzip and man for viewing manual pages. It also explains concepts like pipes, redirection, environment variables and basics of the awk command for text manipulation.
This is a document useful for one who wants to learn the Basics of UNIX command.
Targeted for fresher to the industry and new learner of UNIX command for experienced professionals too.
Hope everyone will like it.
This lecture covers the use of wild cards in Linux commands, as well as escape sequences
Check the other Lectures and courses in
http://Linux4EnbeddedSystems.com
or Follow our Facebook Group at
- Facebook: @LinuxforEmbeddedSystems
Lecturer Profile:
- https://www.linkedin.com/in/ahmedelarabawy
This document discusses Linux file permissions and ownership. It explains that Linux uses a user/group ownership model where files and directories have read, write and execute permissions for the owner, group and others. It also describes how to change permissions and ownership using the chmod and chown commands. The document provides examples of using these commands and includes a lab activity asking the user to create files, set permissions on them, and test access.
The document provides an overview of basic Linux commands organized into the following sections:
1. General purpose utilities such as date, echo, printf, calculator applications
2. Linux file system structure and commands for viewing file attributes, permissions, ownership
3. Commands for file handling, concatenation, pagination and comparing files
we need to have a good amount of basic or in-depth knowledge on Linux Basics. This will help one's job easy in resolving the issues and supporting the projects.
Are you a system admin or database admin? Or working on any other technology which is deployed or implemented on linux/UNIX machines? Then you should be good with Linux basic concepts and commands. We will cover this section very clearly.
This document provides a quick reference to useful UNIX commands organized into categories such as file commands, directory commands, symbolic links, terminal commands, help commands, and more. It includes brief descriptions and usage examples for commands like ls, cd, cp, grep, find, and others. The document is intended as a quick reference and not a replacement for manuals or books on UNIX. It recommends Unix in a Nutshell as a reference.
This document provides a summary of Linux/Unix commands organized into categories including file handling, system information, networking, process management, installation, editors, and advanced filters. It lists common commands like ls, cp, grep, ifconfig, kill, apt-get install, and vi along with brief descriptions of their functions. Advanced examples are given for commands like sed, awk, and regular expressions to manipulate text within files.
This document provides a summary of useful Linux commands for starting and stopping the system, accessing and mounting file systems, finding files and text, moving, copying, deleting, and viewing files, installing software, user administration, and the X Window System. It lists commands such as shutdown, halt, reboot, mount, umount, find, locate, updatedb, which, grep, ls, rpm, tar, adduser, passwd, su, and exit along with brief explanations of their functions.
The document discusses various Unix/Linux commands for text processing and file management. It describes the commands head, tail, tr, sort, cut, uniq, diff, tee, find, and grep. Head displays the first few lines of a file, tail displays the last few lines, and tr translates or deletes characters. Sort sorts the lines of a text file, cut removes sections from each line, and uniq removes duplicate lines from a sorted file. Diff finds differences between two files.
DNS (Domain Name System) is a hierarchical naming system that translates domain names to IP addresses and vice versa. A DNS server is a computer that runs DNS services to provide name resolution. DNS works by querying multiple levels of DNS servers, starting from the root servers, then TLD (top-level domain) servers, then authoritative name servers, to ultimately resolve domain names to IP addresses.
A command is normally entered in a line by typing from the keyboard.
Commands , options and command arguments must be seperated by white space or tabs.
Linux is an open-source operating system that can run on various hardware. The document discusses various Linux commands and concepts related to directories, files, permissions, users, groups, text editors like vi and vim, process management, disk partitioning and more. It also covers Linux installation, package management, shell scripting and configuring network and services like SSH, web servers and more. Exercises are included to help understand concepts like mount points, journaling and file attributes.
The document provides a cheat sheet for basic Unix commands. It summarizes commands for listing directories, changing directories, making directories, removing directories, copying and moving files, deleting files, downloading and uploading files, viewing files, editing files, finding files, setting permissions, and more. It also provides examples of aliases and scripts that can be created in Unix.
This document provides a list of common Unix commands along with a brief description of what each command does. It includes commands for navigating and viewing files, editing text, finding and manipulating text, compressing and archiving files, remote access, printing, and more. The summary at the end highlights some frequently used commands for listing users, viewing directories, viewing parts of files, managing processes, text editing, disk usage, searching text, and remote access.
Unix 1st sem lab programs a - VTU KarnatakaiCreateWorld
This document contains code for several shell scripting exercises:
1. Lab1a accepts command line arguments and prints them in reverse order.
2. Lab1b checks if two file permissions are identical, printing the common permission or each file's individual permissions.
3. Lab2b creates all directories in a path if they don't exist.
4. Lab9b counts and reports the occurrences of words from the first argument file that are present in other argument files.
Course 102: Lecture 3: Basic Concepts And Commands Ahmed El-Arabawy
This lecture covers the basic file management commands
Check the other Lectures and courses in
http://Linux4EnbeddedSystems.com
or Follow our Facebook Group at
- Facebook: @LinuxforEmbeddedSystems
Lecturer Profile:
- https://www.linkedin.com/in/ahmedelarabawy
This document provides an overview of basic Linux file management commands like cp, mv, rm, mkdir and touch. It discusses using cp to copy files and directories, mv to move and rename files, rm to remove files and directories, mkdir to create directories and touch to update file timestamps. It also covers using find to search for files based on criteria like name, size, permissions and timestamps.
This document provides an overview of basic Linux commands for navigation, listing directories, reading and manipulating files. It explains commands like pwd, cd, ls, cat, cp, mv, rm, mkdir to change directories, list files, read files, copy, move and delete files/directories. It also introduces the vi editor for creating new files and mentions some other miscellaneous commands like date, chmod, user management tools.
The document provides summaries of common Linux utilities used for file and directory management. Some key utilities summarized include:
pwd displays the current working directory. cd changes directories. ls lists directory contents. cat displays file contents. mkdir creates directories. rm removes files. chmod changes file permissions. cp copies files. mv renames or moves files/directories. diff compares files.
The document also provides examples for using each utility and explains options to filter output or modify file attributes. Special characters, quoting, wildcards, and comparing/printing files are also summarized in the document.
This document provides an overview of the basics of Unix including its history and development. It describes Unix as a command user interface (CUI) operating system that is case sensitive and allows multitasking. Various flavors of Unix are then listed along with common commands like date, cal, uname and their usage. The document also covers working with files and directories through commands like cat, touch, rm, mkdir and managing files through commands like cp, mv and viewing files with ls.
This document provides an overview of basic Unix commands, including:
- Commands for navigating directories (cd, pwd, ls), creating/removing directories and files (mkdir, rmdir, cp, rm)
- Commands for viewing file contents (cat, more, less) and comparing files (diff)
- Commands for searching files (grep) and counting elements (wc)
- Commands for changing file permissions (chmod) and moving/renaming files (mv)
It also briefly describes shells, files and pathnames in Unix systems. The document is intended as an introduction for new Unix users to understand basic file management and navigation.
Introduction to Linux OS, Linux file system hierarchy, Linux commands, Files permissions, Input-Output redirection, Environment variables, Process management, Linux shell scripting.
This document provides an overview of the Linux file system including:
1. It defines the main directories and contents according to the Filesystem Hierarchy Standard (FHS) with the root directory being "/" and possible multiple partitions and filesystems.
2. It describes the different types of files like ordinary files, directories, and special files as well as file permissions for reading, writing, and executing files and directories.
3. It explains how to change file permissions using the chmod command and navigate the file system using commands like pwd, cd, and ls including examples of using options, wildcards and navigation.
This document provides an overview of basic Linux commands for common file system tasks like navigating directories, managing files, and copying or moving files. It describes commands like pwd to print the working directory, cd to change directories, ls to list directory contents, mkdir to create directories, cat to view file contents, rmdir to delete empty directories, rm to delete files and directories, and cp and mv to copy and move files between locations.
The document summarizes common internal commands in MS-DOS, including commands to display or change the date and time (DATE, TIME), clear the screen (CLS), view directory listings (DIR), create and change directories (MD, CD), manage files (COPY, TYPE, DELETE, RENAME), and view volume labels (LABEL, VOL). These commands are built into the command.com file and allow users to manage files, directories, and system settings from the command line.
This document provides a summary of common Linux commands organized by category including file permissions, networking, compression/archives, package installation, searching, login, file transfer, disk usage, directory traversal, system information, hardware information, users, file commands, and process related commands. It also includes brief descriptions and examples of commands like chmod, chown, ip, tar, rpm, grep, ssh, df, du, and kill. More detailed information on Linux commands can be found at the provided URL.
This document provides a summary of common Linux commands organized by category including file permissions, networking, compression/archives, package installation, searching, login, file transfer, disk usage, directory traversal, system information, hardware information, users, file commands, and process related commands. It also includes brief descriptions and examples of commands like chmod, chown, ip, tar, rpm, grep, ssh, df, du, and kill. More detailed information on Linux commands can be found at the provided URL.
Linux is a Unix-like and mostly POSIX-compliant computer operating system (OS) assembled under the model of free and open-source software development and distribution. The defining component of Linux is the Linux kernel, an operating system kernel first released on 5 October 1991 by Linus Torvalds. The Free Software Foundation uses the name GNU/Linux to describe the operating system, which has led to some controversy.
The primary difference between Linux and many other popular contemporary operating systems is that the Linux kernel and other components are free and open-source software. Linux is not the only such operating system, although it is by far the most widely used. Some free and open-source software licenses are based on the principle of copyleft, a kind of reciprocity: any work derived from a copyleft piece of software must also be copyleft itself. The most common free software license, the GNU General Public License (GPL), is a form of copyleft, and is used for the Linux kernel and many of the components from the GNU Project.
Tux the penguin, mascot of Linux
Developer: Community
Written in: Primarily C and assembly
OS family: Unix-like
Working state: Current
Source model: Mainly open source, proprietary software also available
Initial release: 1991; 24 years ago
Marketing target: Personal computers, mobile devices, embedded devices, servers, mainframes, supercomputers
Available in: Multilingual
Platforms: Alpha, ARC, ARM, AVR32, Blackfin, C6x, ETRAX CRIS, FR-V, H8/300, Hexagon, Itanium, M32R, m68k, META, Microblaze, MIPS, MN103, Nios II, OpenRISC, PA-RISC, PowerPC, s390, S+core, SuperH, SPARC, TILE64, Unicore32, x86, Xtensa
Kernel type Monolithic (Linux kernel)
Userland: Various
Default user interface: Many
License: GPL version 2 and other free and open-source licenses, except for the "Linux" trademark.
1. The document describes common Linux commands like ls, pwd, mkdir, cd, rmdir, cp, mv, rm, touch, cat, echo, clear.
2. It provides the syntax and examples of using each command, such as ls to list files, pwd to print the current working directory, and mkdir to create directories.
3. The practical sections demonstrate how to use ls with options to sort listings, navigate and list the home directory, move files between directories, sort files by size, and print the current working directory.
The document provides an overview of basic Linux commands organized into the following sections:
1. General purpose utilities such as date, echo, printf, calculator commands etc.
2. Linux file system structure and commands for viewing file attributes, permissions and ownership.
3. Commands for file handling, concatenating, comparing, viewing and getting statistics of files.
Linux is an open source operating system initially created by Linus Torvalds in 1991. It has since grown significantly with hundreds of companies and individuals developing their own versions based on the Linux kernel. The kernel is developed under the GNU GPL license and its source code is freely available. Basic Linux commands allow users to navigate directories, manage files and permissions, transfer files, and get system information. More advanced commands provide additional control and functionality.
Basic basic solaris quick referent cardBui Van Cuong
This document provides a quick reference for basic Solaris commands. It lists common commands for navigating the file system, viewing files, manipulating text, searching, networking, processes, shells, variables and flow control. Sections cover the file hierarchy, file types and listing, redirection, wildcards, translations, finding files, regular expressions, and shell initialization and programming.
Linux is an open source operating system where everything can be done via commands. It was developed by Linus Torvalds and the first official version 0.02 was released in 1991. The shell is a program that takes commands from the keyboard and gives them to the operating system to perform tasks. Common shells include BASH, KSH, and TCSH. Vi is a basic text editor used on Linux systems to create, edit, and view text files. It has two modes - command mode to enter commands and insert mode to add/edit text. Basic file management, text processing and other useful commands are also described.
Unix is an operating system that provides an interface between users and hardware. It manages storage, I/O devices, and allows for multi-tasking and multi-user access. The Unix operating system originated in 1969 and has evolved over time with contributions from various universities and companies. It uses a kernel to manage interactions between users, applications, and hardware. The shell is the interface that users interact with to run commands and programs on the system.
Advanced control scheme of doubly fed induction generator for wind turbine us...IJECEIAES
This paper describes a speed control device for generating electrical energy on an electricity network based on the doubly fed induction generator (DFIG) used for wind power conversion systems. At first, a double-fed induction generator model was constructed. A control law is formulated to govern the flow of energy between the stator of a DFIG and the energy network using three types of controllers: proportional integral (PI), sliding mode controller (SMC) and second order sliding mode controller (SOSMC). Their different results in terms of power reference tracking, reaction to unexpected speed fluctuations, sensitivity to perturbations, and resilience against machine parameter alterations are compared. MATLAB/Simulink was used to conduct the simulations for the preceding study. Multiple simulations have shown very satisfying results, and the investigations demonstrate the efficacy and power-enhancing capabilities of the suggested control system.
Introduction- e - waste – definition - sources of e-waste– hazardous substances in e-waste - effects of e-waste on environment and human health- need for e-waste management– e-waste handling rules - waste minimization techniques for managing e-waste – recycling of e-waste - disposal treatment methods of e- waste – mechanism of extraction of precious metal from leaching solution-global Scenario of E-waste – E-waste in India- case studies.
Null Bangalore | Pentesters Approach to AWS IAMDivyanshu
#Abstract:
- Learn more about the real-world methods for auditing AWS IAM (Identity and Access Management) as a pentester. So let us proceed with a brief discussion of IAM as well as some typical misconfigurations and their potential exploits in order to reinforce the understanding of IAM security best practices.
- Gain actionable insights into AWS IAM policies and roles, using hands on approach.
#Prerequisites:
- Basic understanding of AWS services and architecture
- Familiarity with cloud security concepts
- Experience using the AWS Management Console or AWS CLI.
- For hands on lab create account on [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
# Scenario Covered:
- Basics of IAM in AWS
- Implementing IAM Policies with Least Privilege to Manage S3 Bucket
- Objective: Create an S3 bucket with least privilege IAM policy and validate access.
- Steps:
- Create S3 bucket.
- Attach least privilege policy to IAM user.
- Validate access.
- Exploiting IAM PassRole Misconfiguration
-Allows a user to pass a specific IAM role to an AWS service (ec2), typically used for service access delegation. Then exploit PassRole Misconfiguration granting unauthorized access to sensitive resources.
- Objective: Demonstrate how a PassRole misconfiguration can grant unauthorized access.
- Steps:
- Allow user to pass IAM role to EC2.
- Exploit misconfiguration for unauthorized access.
- Access sensitive resources.
- Exploiting IAM AssumeRole Misconfiguration with Overly Permissive Role
- An overly permissive IAM role configuration can lead to privilege escalation by creating a role with administrative privileges and allow a user to assume this role.
- Objective: Show how overly permissive IAM roles can lead to privilege escalation.
- Steps:
- Create role with administrative privileges.
- Allow user to assume the role.
- Perform administrative actions.
- Differentiation between PassRole vs AssumeRole
Try at [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
Embedded machine learning-based road conditions and driving behavior monitoringIJECEIAES
Car accident rates have increased in recent years, resulting in losses in human lives, properties, and other financial costs. An embedded machine learning-based system is developed to address this critical issue. The system can monitor road conditions, detect driving patterns, and identify aggressive driving behaviors. The system is based on neural networks trained on a comprehensive dataset of driving events, driving styles, and road conditions. The system effectively detects potential risks and helps mitigate the frequency and impact of accidents. The primary goal is to ensure the safety of drivers and vehicles. Collecting data involved gathering information on three key road events: normal street and normal drive, speed bumps, circular yellow speed bumps, and three aggressive driving actions: sudden start, sudden stop, and sudden entry. The gathered data is processed and analyzed using a machine learning system designed for limited power and memory devices. The developed system resulted in 91.9% accuracy, 93.6% precision, and 92% recall. The achieved inference time on an Arduino Nano 33 BLE Sense with a 32-bit CPU running at 64 MHz is 34 ms and requires 2.6 kB peak RAM and 139.9 kB program flash memory, making it suitable for resource-constrained embedded systems.
Software Engineering and Project Management - Introduction, Modeling Concepts...Prakhyath Rai
Introduction, Modeling Concepts and Class Modeling: What is Object orientation? What is OO development? OO Themes; Evidence for usefulness of OO development; OO modeling history. Modeling
as Design technique: Modeling, abstraction, The Three models. Class Modeling: Object and Class Concept, Link and associations concepts, Generalization and Inheritance, A sample class model, Navigation of class models, and UML diagrams
Building the Analysis Models: Requirement Analysis, Analysis Model Approaches, Data modeling Concepts, Object Oriented Analysis, Scenario-Based Modeling, Flow-Oriented Modeling, class Based Modeling, Creating a Behavioral Model.
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...IJECEIAES
Medical image analysis has witnessed significant advancements with deep learning techniques. In the domain of brain tumor segmentation, the ability to
precisely delineate tumor boundaries from magnetic resonance imaging (MRI)
scans holds profound implications for diagnosis. This study presents an ensemble convolutional neural network (CNN) with transfer learning, integrating
the state-of-the-art Deeplabv3+ architecture with the ResNet18 backbone. The
model is rigorously trained and evaluated, exhibiting remarkable performance
metrics, including an impressive global accuracy of 99.286%, a high-class accuracy of 82.191%, a mean intersection over union (IoU) of 79.900%, a weighted
IoU of 98.620%, and a Boundary F1 (BF) score of 83.303%. Notably, a detailed comparative analysis with existing methods showcases the superiority of
our proposed model. These findings underscore the model’s competence in precise brain tumor localization, underscoring its potential to revolutionize medical
image analysis and enhance healthcare outcomes. This research paves the way
for future exploration and optimization of advanced CNN models in medical
imaging, emphasizing addressing false positives and resource efficiency.
1. UNIX Commands
To Create a File:
Syntax: $ cat [option] > <filename>
Ex: $ cat > file1
Hello..
This is my first File
Have a Nice Day
Bye
Ctrl+d (Save)
Ctrl+d – Possible Completer
Ctrl+c – Cancel foreground Job
Ctrl+z – Stop (interrupted) a foreground Job
To View a already existing File:
Syntax: $ cat <filename>
Ex: $ cat file1
To append data to an existing file
Syntax: $ cat >> <filename>
Ex: $ cat >> file1
To Create a Multiple file with help of cat command
Syntax: $ cat <filename1 filename2 ...filename (n) >
Ex: $ cat >f1 >f2 >f3 >f4
Hello....
This is file number f4
We create multiple files
^d (Save)
Display the record number to the particular file
Syntax: $ cat [option] <filename>
Ex: $ cat -n file1
To ignore the blank Records
Syntax: $ cat [option] <filename>
Ex: $ cat -b file1
Vijay Kumar E R – 98486 11007
1
2. Create a Hidden file
Syntax: $ cat [option] <filename>
Ex: $ cat >.file1
Create a Directory
Syntax: $ mkdir [option] <Directory name>
Ex: $mkdir raju
Create Multiple Directories
Syntax: $ mkdir [option] <Directory names>
Ex: $ mkdir d1 d2 d3 d4 d5
Create Multi – level Directories
Syntax: $ mkdir [option] <Directory names>
Ex: $ mkdir –p /d5/d51/d52/d53
Create Multiple Sub directories
Syntax: $ mkdir [option] <Directory names>
Ex: $ mkdir –p d3/d31 d4/d41
To Display present working Directory
Syntax: $ pwd
Ex: $ pwd
To Change the Directory
Syntax: $ cd <Directory name>
Ex: $ cd raju
To change the directory forward
Syntax: $ cd..
Ex: $ cd..
To Move parent Directory (root)
Syntax: $ cd /
Ex: $ cd /
To Create a Hidden Directory
Syntax: $ mkdir [option] <Directory name>
Ex: $ mkdir .venkat
Vijay Kumar E R – 98486 11007
2
4. LIST COMMANDS
$ ls : It is a command to list the files and directories in
the present working Directory
$ ls - a : It is a command to display all files and
Directories including hidden files and Directories
$ls * : List information about the Files (the current
directory by default). Sort entries alphabetically
$ls ~ : It list the all Backup files
$ls @ : It list the all linked files and Directories
$ls -d : It Displays the present working Directory.
$ls -i : It Displays the inode numbers of files and
Directories
$ls -s : It Displays the sizes in blocks (Files &
Directories)
$ls -l : It Displays the long listing files and
directories in present working directory
Listing directory contents:
$ ls list a directory
$ ls -l list a directory in long (detailed) format
for example:
$ ls -l
drwxr-xr-x 4 vijay user 1024 Jun 18 09:40 WAITRON_EARNINGS
-rw-r--r-- 1 kiran user 767392 Jun 6 14:28 scanlib.tar.gz
^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
| | | | | | | | | | |
| | | | | owner group size date time name
| | | | number of links to file or directory contents
| | | permissions for world(others)
| | permissions for members of group
| permissions for owner of file: r = read, w = write, x = execute -=no
permission
Vijay Kumar E R – 98486 11007
4
5. type of file: - = normal file, d=directory, l = symbolic
link, and others...
ls -ld * List all the file and directory names in the
current directory using long format. Without the "d" option,
ls would list the contents of any sub-directory of the
current. With the "d" option, ls just lists them like regular
files.
$ ls -al : It Displays including hidden and log
listing files and Directories
$ ls -m : It Displays all files and Directories with
separated by comma (,)
$ ls -ls : It Displays all long listing Directories
$ ls --full-time : It Displays files and Directories
with total information date and time
$ ls -nl : It Displays the long listing files and
Directories according to modification Time
$ ls -rtl : It Displays the file and Directories
with reverse order
$ ls -R : It Displays the all files and Directories
Regressively (order by order)
$ ls -l : It Displays the files and Directories in a
single column (vertical)
$ ls -x : It Displays the files and Directories with
multiple columns
COPY COMMANDS
Syntax: $cp [option] <source file> <Destination file>
1. File to a File
2. File to a Dictionary
3. Directory to Directory
File to File
Vijay Kumar E R – 98486 11007
5
6. Syntax : $cp <source file> <Destination file>
Ex : $cp venkat amar
..... New file
Ex : $cp venkat john
Existing file
Note: The content of john file overwrite with venkat
Ex ; $cp -f venkat kumar
Note : It is copy the file forcibly venkat to kumar without any permission
Ex : $cp -i venkat gandhi
Note : It is copy the file interactive mode venkat to kumar with permissions
2. File to Directory
Syntax ; $ cp <source file> <Destination Directory>
Ex ; $ cp venkat ajay
.... ajay is Directory
Ex : $ cp -b venkat satya
Note : It copys the venkat file to Satya Directory with backup
Ex : $ cp -bf venkat kiran
Note ; It copys the venkat file to Kiran Directory with forcibly backup
Ex : $ cp -ibf venkat yusuf
Note : It copys the venkat file to Yusuf Directory with backup interactively and forcibly
Ex : $ cp file1 file2 file3 Directory
Note : It copies the no of file to Directory
3. Directory to Directory
Syntax : $ cp <Source Directory> <Destination Directory>
Ex : $ cp Dravid Ganguly
Ex : $ cp -r Mody Venkat
Note : It copies the Directory to Directory (including all files and Directories)
Ex : $ cp -ir <Directory 1> <Directory 2>
Vijay Kumar E R – 98486 11007
6
7. Note : It copies the Directory to Directory (including with all files and directories with
interactive mode)
Ex : $ cp -rf <Dir 1 > <Dir 2> <Dir 3> <Destination
Directory>
Note : It copies the multiple Directories with forcibly and recessively mode
MOVE COMMANDS
This command is used to move the files and directories one place to another place
Syntax: $ mv [option] <Source file/Directory> <Target file/Directory>
These are basically 3 types
1. File to File
2. File to Directory
3. Directory to Directory
1. File to File
Syntax: $ mv [option] <Source file> <Target file>
Ex: $ mv file1 file2
Ex: $mv -b file1 file2
Note: The file1 move to file2 with backup
Ex: $ mv -f file1 file2
Note: The file1 move to file2 with forcibly
Ex: $ mv -if file1 file2
Note: The file1 move to file2 with interactive and forcibly mode
2. File to Directory
Syntax: $ mv [option] <Source file> <Target Directory>
Ex: $ mv file1 Dir1
Note: The file1 moves to Directory (Dir1)
Ex: $ mv -b file1 Dir1
Note: The file1 move to Dir1 with backup mode
Ex: $mv -f file1 Dir1
Note: The file1 move to Dir1 with forcibly mode
Vijay Kumar E R – 98486 11007
7
8. Ex: $mv -if file1 Dir1
Note: The file1 move to Dir1 with interactive and forcibly mode.
3. Directory to Directory
Syntax: $ mv [option] <Source Directory> <Target Directory>
Ex: $ mv Dir1 Dir2
Note: The content of Dir1 moves to Dir2
Ex: $ mv -b Dir1 Dir2
Note: The contents of Dir1 move to Dir2 with backup
Ex: $ mv -f Dir1 Dir2
Note: The contents of Dir1 moves to Dir2 with forcibly
Ex: $ mv -if Dir1 Dir2
Note: The contents of Dir1 moves to Dir2 with interactive and forcibly mode.
PATH IN UNIX
1. Absolute path
2. Relative path
1. Absolute path: It is an independent on present working directory
2. Relative path: It is a path mention from root directory
Absolute path Example:
Ex: $ cd /b1/b2/b3/b4/b5
: $ cp /usr/paramesh/a1/a2/a3/file <Directory>
Relative Path Example:
Ex: $cd /b1/b2/b3/b4/b5
: $mv ../../../../../c1/c2/c3/c4/c5
FILE ACCESS PERMISSIONS (FAP)
-rwx------
drwxr--r--
-rwx-w--w-
Vijay Kumar E R – 98486 11007
8
9. d - Directory
w - Wrire
r - Read
x - Executable
Note: Without write permissions we can’t copy, remove, modify, move, crate
drwxrwxrwx
7 7 7
Directory – 777
File – 666
Default Directory Permissions – 755
Default File Permissions – 644
Read – 4
Write – 2
Executable – 1
Total Permissions 7
TO CHANGE AND MODIFY THE PERMISSIONS
1. Numeric Method
2. Symbolic Method
1. Numeric Method:
Syntax: $ chmod [permissions] <file/Directory>
Ex: $ chmod 700 Dir2
$ chmod 640 file1
To check the changed permission use the command: ls - l
To change the permissions and check the permission using following command
Ex: $ chmod -c 750 Dir2
To change the permission with Directories and subdirectories with regressively
Ex: $ chmod -R 755 Dir2
To Change the present working Directory Permissions
Ex: $ chmod - R 750
Note : Plz don’t' try this command on the system
Vijay Kumar E R – 98486 11007
9
10. 2. Symbolic Method
User – u
Group – g
Others – o
All – a
Read – r
Write – w
Execute – x
Syntax: $ chmod [options] <File/Directory>
To Add Write permission to Group and Others
Ex: $ chmod g+w, o+w Dir1
To Remove the Write Permission to User
Ex: $ chmod u-w Dir1
To Remove the Write and execute permissions to Group and Others
Ex: $chmod g-r, g-x, o-r, o-x Dir1
Append the Write permissions to all
Ex: $chmod u+w, g+w, o+w Dir1
(or)
$chmod a+w Dir1
UMASK (User File Creation Mask)
- cuting, remove, hidden
By Default umask value is 022
Directory File
777 666
022 022
755 644
WILD CARDS
^ - Carrot or Cap
? - Single Character
* - Multiple Characters
[ ] - Range of Characters
Ex: ls ? - This command is used list with single character
files
Vijay Kumar E R – 98486 11007
10
11. ls ?? - This command is used to list with double character
files
ls ? [0-9] – This command is used to list the files starting
with alphabetically and with numeric
ls * - This command is used to display the all the files and
directories and files Subdirectories
ls a* - This command is used to display the files with
starting letter with 'a' Character
Remove Commands
Syntax: rm [option] <file/directory name>
Ex: rm * - This command is used to delete all the files in
current directories
Note: plz don't use this command without permission
Ex: rm ? - To delete single character files
Ex: rm ?? - To delete double character files
Ex: rm a* - To delete the files starting with
character 'a'
Links
Call the link function to create a link to a file.
Call the link function to create a link named FILE2 to an existing FILE1
1. Hard link
2. Soft Link
1. Hard Link : Hard link can be build single file system
Hard link can recognized it links same permissions and same size, same inon
number
If the data is source loss we got from hard link
inon number is given space allocated
inon numbers can recognized different logical names
Syntax : ln <source file> <target file>
Ex : ln -f vankat kumar ( f – forcibly)
Ex : ln -i venkat kumar (i – interactively)
Vijay Kumar E R – 98486 11007
11
12. 2. Soft Link : It can be built across the file system
It the source file is delete we can't retrieve from target file
Syntax : ln -s <source file> <target file>
Ex : ln sd Dir1 Dir2 (d – Directories)
Ex : ln -sf File1 File2 (f – forcibly)
Ex : ln -si File1 File2 (s – inode number)
FIND COMMANDS
It search for files in a directory hierarchy
Syntax: find [path...] [expression]
/ - root
~ - Home Directory
. - Present working directory
Ex: $ find /bin –type f
It searches the files and directories absolute path of the
root.
Ex: $ find ~ -type d
It searches the directories and subdirectories in the Home
directory
Ex: $ find ~ -type l
It searches the linked files
Ex: $ find ~ -type f -name “file1”
It searches the absolute path of the filename
Ex: $ find ~ -type d -name “raj”
It searches the absolute path of the Directories
Ex: $ find ~ -type f -name “file1” exce cat{};
It searches the absolute path of the filename and displays
the contents of file.
Ex: $ find ~ -type f -name “file1” exce cat {} exce rm{};
It searches the absolute path of the filename and displays
the content of file, and removes at the same time.
Ex: $ find ~ -type f -perm 644
Vijay Kumar E R – 98486 11007
12
13. It searches the file under with 644 permission
Ex: $ find ~ -type f -perm 644 -exce chmod 640 {};
It searches the filename under with permission 644 and change
the file permissions to 640.
Ex: $ find ~ -type f size 0;
It Searches the Zero byte files
Linux: 512 bytes – 1 block
Ex: $ find ~ -type f size 100c (Exactly 100 bytes file)
$ find ~ -type f size +100c (above 100 bytes file)
$ find ~ -type f size -100c (below 100 bytes file)
Ex: $ find ~ -type d size 8b
It searches the 8bytes Directories
Ex: $ find ~ -type f -i num “1098”
It searches the file with inode number
Ex: $ find ~ type d – inum “1024”
It searches the directories with inode number
Time
-a – Access
-c – Changed
-m – Modified
Ex: $ find ~ -type f –a min 30
It searches the file before 30 min access
Ex: $ find ~ -type f –a time –n/n/+n
It searches the file before few days
Vi Editor (Visual Editor)
Vi is a text editor that is upwards compatible to Vi. It can be used to edit all kinds of plain
text. It is especially useful for editing programs.
1. Esc mode
2. Insert mode
3. Colon mode
A, a
Vijay Kumar E R – 98486 11007
13
14. I, i
O, o
S With the help of these keys move esc mode to inert mode
Shift: with the help of shift: move to Esc mode to colon mode
Esc Mode Commands k h l j
By press
'L' - The cursor moves right direction
'h' - The cursor moves one character left
'k' - The cursor moves one character up
'j' - The cursor moves one character down
'w' - The cursor moves next line first
5w - The cursor moves 5 words forward
nw - The cursor moves n words forward
b - The cursor moves previous word
5b - The cursor moves 5 words before
nb - The cursor moves n words before
e - The cursor moves next word last character
$ - The cursor moves the end of the record
^ - The cursor moves the starting of the record
gg - The cursor moves the first record
15gg - The cursor moves the 15th
record of the file
ngg - The cursor moves the nth record of the file
G - The cursor moves the last record of the file
5G - The cursor moves the 5th
record of the file
H - The cursor moves the starting record of the
file(window)
L - The cursor moves the last record of the file
(window)
M - The cursor moves the middle record of the
file(window)
Ctrl + f - To scroll the page forward
Ctrl + b - To scroll the page backward
Ctrl + d - To scroll the half page forward
Ctrl + u - To scroll the half page backward
Esc Mode (Delete Command)
Vijay Kumar E R – 98486 11007
14
15. x - To delete present cursor position character
X - To delete previous character
dd - To delete a record
ndd - To delete 'n' records
dw - To delete a word
5dw - To delete 5 words
db - To delete a previous word
5db - To delete a 5 previous words
ndb - To delete a n previous words
d$ - To delete present cursor to the end of the record
d^ - To delete present cursor position to starting
of the record
Yanking Commands (copying)
y - To yank a single character
y^ - To yank present cursor position to starting of
the record
y$ - To yank present cursor position to ending of
the record
dgg - To yank present cursor position to starting of
the record
Ex : (1 – 20) if cursor in 10th
position
yy - To yank the record (copy)
5yy - To yank 5 records present cursor position
nyy - To yank n records present cursor position
ngg - To yank present cursor position to the first position
yG - To yank present cursor position to the last position
yw - To yank the work
5yw - To yank 5 words
yb - To yank previous word
5yb - To yank previous 5 words
nyb - To yank previous n words
Paste Commands
p - Paste the right side of the cursor position
P - Paste the left side of the cursor position
p - Paste below the cursor position
P - Paste above the cursor position
Replace Commands
Vijay Kumar E R – 98486 11007
15
16. r - To replace present cursor position character
R - To replace the entire record
cc - To recreate the Record
cw - To replace the word
cv - To replace the previous word
Special Commands
u - To undo the previous action
. - To redo the previous action
J - To join the records
~ - To change to lowercase to upper case letter upper case
to lowercase letters
Search Command
/ <pattren> - To search for particular pattern (word)
Ex : /unix
n - cursor moves to the next accurance
N - cursor moves to the previous accurance
Insert Mode Commands
A - Append the letter end of the line
a - Append the letter after the cursor
i - Append the letter before the cursor
I - Append the letter beginning of the line
o - open a line below the cursor
O - open a line above the cursor
s - Delete the present cursor position and insert
the character
Colon Mode Commands:
:w - To save a file
:q - To quit a file without save
:wq! - To save and quit a file forcibly
:senu - To display record numbers
:se nonu - To remove display record numbers
:/<pattern> - To search top to bottom
:?<pattern> - To search bottom to top
:se ic - It ignores the cases and search the records
Vijay Kumar E R – 98486 11007
16
17. :se noic - It disable particular above action
:se ai - It sets a new line (auto indent)
:se noai - It disables particular action
:d$ - To delete a last record
:%d - To delete all the records in the file
:10,20w <new filename> - Copy to another new file
:10,25w! <target file> - Copy to target file forcibly
:25,30w >> <filename> - Append existing file
:10 co 50 - Copy 10th
record after the 50th
Record
:10 mo 50 - Move 10th
record to 50th
record
:5,15 mo 50 - Move 5, 15 records after 50th
record
:s/unix/linux - All records replace
$vi <file1> <file2> <file3> - Multiple file Editor
:n<file3> - to switch file3
:n - instead of file1 to file3
:N - switching from backward file
Redirection
Ex: $ cat < file1 >file2
It redirects the file1 to file2
Ex: $ cat > file1 <file2
It redirects the file2 to file1
Ex: $ cat >file1 <file2 file3
file2 file3 redirects to file1
Ex: $ cat file1 file2 file3 2>>error
FILTERS
Filter is a command or program, which takes the input from the standard input and then
process data to give required output
Simple Filters Advance Filters
Vijay Kumar E R – 98486 11007
17
18. More 1. grep
less 2. sed
pg 3. awk
head
tail
wc
tee
tr
sort
cut
uniq
1. More: More is a filter to display the paging through text page by page
Syntax: $ more <filename>
f - To move next page
b - To move previous page
Spacebar – To scroll the page
Enter Key – To scroll the page line by line
q - Quit
Ex: $ cat Imorz | more
2. less : Less is a program similar to more (1), but which allows backward movement in the
file as well as forward movement. Also, less does not have to read the entire input file
before starting, so with large input files it starts up faster than text editors like vi
Syntax: $ less <filename>
f - To move next page
b - To move previous page
Spacebar – To scroll the page
Enter Key – To scroll the page line by line
q – Quit
Ex: $ cat file1 | less
Note: This command works on Linux only
3. Pg: It displays page by page
Syntax: $ pg <filename>
f - To move next page
b - To move previous page
Spacebar – To scroll the page
Enter Key – To scroll the page line by line
Vijay Kumar E R – 98486 11007
18
19. q – Quit
Ex: cat venkat | pg
Note: This command don't works in Linux
4. head : It displays the first 10 lines of the file (page) – default
Syntax: $ head <filename>
Ex: $ head -15 venkat
Ex: $ cat <filename> | head 20 - It display first 20 lines
5. tail : It displays last 10 records of the file
Syntax: tail <filename>
: tail -20 <filename>
Ex: cat <filename> | tail -20
Ex: tail +25 <filename> - It displays last 25 records
In-between records
Records from 15 to 20
Ex: $ head -10 <filename> | tail -5 (Records 15 to 20)
Ex: $ tail +30 <filename> | head -5 (Records 30 to 35)
If u want to redirect to permanent
Ex: $ head -20 <filename> |tail -5 > file1 (file1 is newfile)
Ex: $ tail +30 <filename> |head -5 > file1 (file1 is newfile)
6. wc : This filter is used to word count
Syntax: $ wc <filename>
Ex: $ wc kiran
no of records to display
Ex: $ wc -l <filename>
no. of words to display
Ex: $ wc -w <filename>
no. of characters to display
Vijay Kumar E R – 98486 11007
19
20. Ex: $ wc -c <filename>
max – length – characters to disply in a file
Ex: $ wc -L <filename>
7. tee : It displays and redirects the same time
read from standard input and write to standard output and files
Ex: $ ls -l <filename>
$ ls -l | tee <filename>
$ ls --full-time | tee -a <filename> - appending
existing file
Note: without | (pipe symbol) tee filter don’t works
8. tr : Translate characters by characters
Translate or delete characters
Syntax: $ tr [option] <filename>
Ex: $ tr “*”, “#” <filename
Ex: $ tr “ abcd”, “xyz” <filename
Duplicate characters avoid with sequential order
Ex: $ tr -s “r” < filename
Delete the characters
Ex: $ tr -d “r” < filename
9. Sort: sort lines of text files according to the first character
Syntax: sort [option] <filename>
Ex : sort student
student filename
01 vijay 60 90
12 anil 70 75
32 sujan 65 40
04 hari 70 45
22 raju 85 50
Sorting priority
Vijay Kumar E R – 98486 11007
20
21. 1. Blank space
2. Special character
3. Numeric
4. Uppercase
5. Lowercase
Numeric:
Ex: $ sort -n <filename>
$ Sort -nr <filename> - Numeric and reverse
If u want permanent
Ex: $ sort -nr <filename> > new file
$ sort -t “:” - field separator
According to the second fields
$ Sort -dt “:” -k2 - directory sorting
$ ls -l | sort -b – k5 - it takes the blank about Field
separator
10. Cut: Remove sections from each line of files.
1. Character cutting
Ex: $ cut -c <filename>
First character of the all lines
Ex: $ cut -c1 <filename>
To cut the first Character Of the all records
Ex: $ cut -c8 <filename>
To cut the 8th
character in each line
Ex: $ cut -c4, 8 <filename>
To cut 4th
and 8th
Character In each line
Ex: $ cut -c4 -8 <filename>
To cut 4th
to 8th
Characters range
2. Field cutting
Vijay Kumar E R – 98486 11007
21
22. -d field separator
Ex: $ cut -d “:” -f2 <filename>
Cut 2nd
field in all records
Ex: $ cut -d “:” -f2, 5 <filename>
Cut 2nd
and 5th
records
Ex: $ cut -d “:” -f2, -5 <filename>
Cut 2nd
to 5th
records
Ex: $ ls -l | tr -s “ “
Sequence space
Ex: $ ls -l | tr -s “ “ | cut -d “ “ -f5
Sequence and cut
11. Uniq: Remove duplicate lines from a sorted file
Syntax: $ uniq [option] <filename>
Ex: $ uniq -d <filename >
Displays only the Duplicate records
Ex: $ uniq -D <filename>
Print all duplicate Records and demeliting is done with blank
lines
Ex: $ uniq –c <filename>
Prefix lines by the Number of occurrences
Advance Filters
1. Grep
The grep utilities are a family of Unix tools, including grep, egrep, and fgrep, that perform
repetitive searching tasks. The tools in the grep family are very similar, and all are used for
searching the contents of files for information that matches particular criteria. For most
purposes, you'll want to use fgrep, since it's generally the fastest
The general syntax of the grep commands is:
Syntax: grep [-options] pattern [filename]
Vijay Kumar E R – 98486 11007
22
23. You can use fgrep to find all the lines of a file that contain a particular word. For example,
to list all the lines of a file named my file in the current directory that contain the word
"dog", enter at the Unix prompt:
Ex: fgrep dog myfile
This will also return lines where "dog" is embedded in larger words, such as "dogma" or
"dogged". You can use the -w option with the grep command to return only lines where
"dog" is included as a separate word:
Ex: grep -w dog myfile
To search for several words separated by spaces, enclose the whole search string in quotes,
for example:
Ex: fgrep "dog named Checkers" myfile
The fgrep command is case sensitive; specifying "dog" will not match "Dog" or "DOG".
You can use the -i option with the grep command to match both upper- and lowercase
letters:
Ex: grep -i dog myfile
To list the lines of myfile that do not contain "dog", use the -v option:
Ex: fgrep -v dog myfile
If you want to search for lines that contain any of several different words, you can create a
second file (named second file in the following example) that contains those words, and
then use the -f option:
Ex: fgrep -f second file my file
You can also use wildcards to instruct fgrep to search any files that match a particular
pattern. For example, if you wanted to find lines containing "dog" in any of the files in your
directory with names beginning with "my", you could enter:
Ex: fgrep dog my*
This command would search files with names such as my file, my.hw1, and my stuff in the
current directory. Each line returned would be prefaced with the name of the file where the
match was found.
By using pipes and/or redirection, you can use the output from any of these commands with
other Unix tools, such as more, sort, and cut. For example, to print the fifth word of every
Vijay Kumar E R – 98486 11007
23
24. line of my file containing "dog", sort the words alphabetically, and then filter the output
through the more command for easy reading, you would enter at the Unix prompt:
Ex: fgrep dog myfile | cut -f5 -d" " | sort | more
If you want to save the output in a file in the current directory named new file, enter:
Ex: fgrep dog my file | cut -f5 -d" " | sort > new file
$ grep –n <file> - To display record number
$ grep -i<file> - To ignore record
$ grep –c <file> - To count in how many records expression
$ grep –E <file> - To search for multiple expression
$ grep –L <file> - It give the file name and which the
regular expression
$ grep –r <file> - To search regressively and present working
directory
$ grep –w <file> - To search for the exact match for the word
$ grep –s <file> - To suppress errors
$ grep “jai” <file> - It prints the expressive record which
have got the “jai”
$ grep –n “jai” <file> - It display the record number and
expression what we give “jai”
$ grep –in “jay” <file> - It ignore and prints the record
“Jay”
$ grep –E “jay prem” <file> - It search for multiple
expressions and prints the record
$ grep –l “jay”* - It displays the filename which the
“Jay” expression is
2. SED
Vijay Kumar E R – 98486 11007
24
25. Sed is a stream editor. A stream editor is used to perform basic text transformations on an
input stream (a file or input from a pipeline). While in some ways similar to an editor which
permits scripted edits (such as ed), sed works by making only one pass over the input(s),
and is consequently more efficient. But it is sed's ability to filter text in a pipeline, which
particularly distinguishes it from other types of editors.
Sed works as follows: it reads from the standard input, one line at a time. for each line, it
executes a series of editing commands, then the line is written to STDOUT. An example
that shows how it works: we use the s command. s means "substitute" or search and
replace. The format is
s/regular-expression/replacement text/{flags}
We won't discuss all the flags yet. The one we use below is g, which means, "replace all
matches"
>cat file
I have three dogs and two cats
>sed -e 's/dog/cat/g' -e 's/cat/elephant/g' file
I have three elephants and two elephants
>
OK. So what happened? Firstly, sed read in the line of the file and executed
s/dog/cat/g
Which produced the following text:
I have three cats and two cats
and then the second command was performed on the edited line and the result was
I have three elephants and two elephants
We actually have a name for the "current text": it is called the pattern space. So a precise
definition of what sed does is as follows:
sed reads the standard input into the pattern space, performs a sequence of editing
commands on the pattern space, then writes the pattern space to STDOUT.
Syntax: sed [OPTION]... {Script-only-if-no-other-script} [Input-file]...
OR
Syntax: sed [option] ‘address/action’ <file>
Vijay Kumar E R – 98486 11007
25
26. Options: -n To suppress input/output
-e Multiple Expressions
-d Delete
-p Print
-s Substitute
Firstly, the way you usually use sed is as follows:
>sed -e 'command1' -e 'command2' -e 'command3' file
>{shell command}|sed -e 'command1' -e 'command2'
>sed -f sedscript.sed file
>{shell command}|sed -f sedscript.sed
so sed can read from a file or STDIN, and the commands can be specified in a file or on the
command line. Note the following:
That if the commands are read from a file, trailing white space can be fatal, in
particular, it will cause scripts to fail for no apparent reason. I recommend editing
sed scripts with an editor such as vim, which can show end of line characters so that
you can "see" trailing white space at the end of line.
Substitute
The format for the substitute command is as follows:
[address1[ ,address2]]s/pattern/replacement/[flags]
The flags can be any of the following
n replace nth instance of pattern with replacement
p write pattern space to STDOUT if a successful substitution takes place
w file Write the pattern space to file if a successful substitution takes place
Delete
The delete command is very simple in its syntax: it goes like this
[address1[ , address2 ] ]d
And it deletes the content of the pattern space. All following commands are skipped
(after all, there's very little you can do with an empty pattern space), and a new line
is read into the pattern space.
Vijay Kumar E R – 98486 11007
26
27. Example 1
>cat file
http://www.foo.com/mypage.html
>sed -e 's@http://www.foo.com@http://www.bar.net@'
file
http://www.bar.net/mypage.html
Note that we used a different delimiter, @ for the substitution command. Sed permits
several delimiters for the s command including @%,;: these alternative delimiters are good
for substitutions which include strings such as filenames, as it makes your sed code much
more readable.
Example 2
>cat file
the black cat was chased by the brown dog
>sed -e 's/black/white/g' file
the white cat was chased by the brown dog
That was pretty straightforward. Now we move on to something more interesting.
Example 3
>cat file
the black cat was chased by the brown dog.
the black cat was not chased by the brown dog
>sed -e '/not/s/black/white/g' file
the black cat was chased by the brown dog.
the white cat was not chased by the brown dog.
In this instance, the substitution is only applied to lines matching the regular expression
not. Hence it is not applied to the first line.
Vijay Kumar E R – 98486 11007
27
28. Example 4
>cat file
line 1 (one)
line 2 (two)
line 3 (three)
Example 4a
>sed -e '1,2d' file
line 3 (three)
Example 4b
>sed -e '3d' file
line 1 (one)
line 2 (two)
Example 4c
>sed -e '1,2s/line/LINE/' file
LINE 1 (one)
LINE 2 (two)
line 3 (three)
Example 4d
>sed -e '/^line.*one/s/line/LINE/' -e '/line/d'
file
LINE 1 (one)
3a : This was pretty simple: we just deleted lines 1 to 2.
3b : This was also pretty simple. We deleted line 3.
3c : In this example, we performed a substitution on lines 1-2.
3d : now this is more interesting, and deserves some explanation. Firstly, it is clear that line
2 and 3 get deleted. But let's look closely at what happens to line 1.
First, line 1 is read into the pattern space. It matches the regular expression ^line.*one
So the substitution is carried out, and the resulting pattern space looks like this:
LINE 1 (one)
So now the second command is executed, but since the pattern space does not match the
regular expression line, the delete command is not executed.
Vijay Kumar E R – 98486 11007
28
29. Example 5
>cat file
hello
this text is wiped out
Wiped out
hello (also wiped out)
WiPed out TOO!
goodbye
(1) This text is not deleted
(2) neither is this ... ( goodbye )
(3) neither is this
hello
but this is
and so is this
and unless we find another g**dbye
every line to the end of the file gets deleted
>sed -e '/hello/,/goodbye/d' file
(1) This text is not deleted
(2) neither is this ... (goodbye)
(3) neither is this
This illustrates how the addressing works when two pattern addresses are specified. sed
finds the first match of the expression "hello", deleting every line read into the pattern
space until it gets to the first line after the expression "goodbye". It doesn't apply the delete
command to any more addresses until it comes across the expression "hello" again. Since
the expression "goodbye" is not on any subsequent line, the delete command is applied to
all remaining lines.
AWK
AWK is a simple and elegant pattern scanning and processing language
AWK is also the most portable scripting language
It was created in late 70th of the last century. The name was composed from the initial
letters of three original authors Alfred V. Aho, Brian W. Kernighan, and Peter J.
Weinberger. It is commonly used as a command-line filter in pipes to reformat the output
of other commands. It's the precursor and the main inspiration of Perl. Although originated
in Unix it is available and widely used in Windows environment too.
Vijay Kumar E R – 98486 11007
29
30. AWK takes two inputs: data file and command file. The command file can be absent and
necessary commands can be passed as augments. As Ronald P. Loui aptly noted awk is very
under appreciated language:
The main advantage of AWK is that unlike Perl and other "scripting monsters" that it is
very slim without feature creep so characteristic of Perl and thus it can be very efficiently
used with pipes. Also it has rather simple, clean syntax and like much heavier TCL can be
used with C for "dual-language" implementations.
awk's favor compared to perl:
- awk is simpler (especially important if deciding which to learn first)
- awk syntax is far more regular (another advantage for the
beginner, even without considering syntax-highlighting editors)
- you may already know awk well enough for the task at hand
- you may have only awk installed
- awk can be smaller, thus much quicker to execute for small programs
- awk variables don't have `$' in front of them :-)
- clear perl code is better than unclear awk code; but NOTHING comes
close to unclear perl code
The basic function of awk is to search files for lines (or other units of text) that contain
certain patterns. When a line matches one of the patterns, awk performs specified actions
on that line. awk keeps processing input lines in this way until it reaches the end of the
input files
Syntax : awk [option] ‘selection criteria {action}’ <file>
Options : -F - To specify the field separator
-f - To invoke the source code
{action} - Only the print action
predefined variables in awk
all predefined variables are in upper cases
FS - Input field separator
OFS - Ouput field separator
NF - Number of fields
NR - Record numbers or No. of records
$ - Fields in awk
Comparation Operator in awk
> - Grater than
Vijay Kumar E R – 98486 11007
30
31. >= - Grater than equal
< - Less than
<= - Less than equal
== - Equal to
!= - Not equal
~ - Matching
!~ - not matching
Logical Operator
&& - AND
|| - OR
awk has got 3 sections
1. BIGIN
2. MIDDLE
3. END
Begin is keyword for the begin section the variable can be assign in begin section
All the operator in the middle sections, Middle is not keyword for the middle section
What ever u print every thing in the section, End is the keyword for the end section
$ awk ‘/ajay/{print}’<file>
It prints the all the records
$ awk ‘/ajay|ramu/{print}’<file>
To search for multiple expressions and print
$ awk ‘NR==4{print}’ <file>
To print specific record
$ awk ‘NR==3,NR==7{print}’<file>
To print range of records
$ awk ‘NR>4{print}’ <file>
To print all the records which are >4
$ awk ‘NR>={print}’ <file>
$ awk ‘NR<4{print}’ <file>
To print all the records which are <4
$ awk ‘NR<=4{print}’ <file>
Vijay Kumar E R – 98486 11007
31
32. if u want print only specific fields
$ awk –F “:” ‘NR==4 {print $1, $3, $4}’ <file>
simple awk program emulates the cat utility; it copies whatever you type on the
keyboard to its standard output (why this works is explained shortly).
$ awk '{ print }'
Now is the time for all good men
-| Now is the time for all good men
to come to the aid of their country.
-| to come to the aid of their country.
Four score and seven years ago, ...
-| Four score and seven years ago, ...
What, me worry?
-| What, me worry?
Ctrl-d
• Print the length of the longest input line:
awk '{if(length($0)> max)max = length($0) }
END { print max }' data
• Print every line that is longer than 80 characters:
awk 'length($0) > 80' data
The sole rule has a relational expression as its pattern and it has no action—so the
default action, printing the record, is used.
• Print the length of the longest line in data:
expand data | awk '{if x < length()) x =length()}
END {print "maximum line length is " x}'
The input is processed by the expand utility to change tabs into spaces, so the
widths compared are actually the right-margin columns.
• Print every line that has at least one field:
awk 'NF > 0' data
Vijay Kumar E R – 98486 11007
32
33. This is an easy way to delete blank lines from a file (or rather, to create a new file
similar to the old file but from which the blank lines have been removed).
• Print seven random numbers from 0 to 100, inclusive:
awk 'BEGIN {for(i=1;i<=7;i++)print int(101*rand())}'
• Print the total number of bytes used by files:
ls -l files | awk '{ x += $5 }
END { print "total bytes: " x }'
• Print the total number of kilobytes used by files:
ls -l files | awk '{ x += $5 }
END { print "total K-bytes: " x + 1023)/1024 }'
• Print a sorted list of the login names of all users:
awk -F: '{ print $1 }' /etc/passwd | sort
• Count the lines in a file:
awk 'END { print NR }' data
• Print the even-numbered lines in the data file:
awk 'NR % 2 == 0' data
If you use the expression `NR % 2 == 1' instead, the program would print the odd-
numbered lines
EXAMPLES
# is the comment character for awk. 'field' means
'column'
# Print first two fields in opposite order:
awk '{ print $2, $1 }' file
# Print lines longer than 72 characters:
Vijay Kumar E R – 98486 11007
33
34. awk 'length > 72' file
# Print length of string in 2nd column
awk '{print length($2)}' file
# Add up first column, print sum and average:
{ s += $1 }
END { print "sum is", s, " average is", s/NR }
# Print fields in reverse order:
awk '{for i = NF; i > 0; --i)print $i }' file
# Print the last line
{line = $0}
END {print line}
# Print the total number of lines that
contain the word Pat
/Pat/ {nlines = nlines + 1}
END {print nlines}
# Print all lines between start/stop pairs:
awk '/start/, /stop/' file
# Print all lines whose first field is
different from previous one:
awk '$1 != prev { print; prev = $1 }' file
# Print column 3 if column 1 > column 2:
awk '$1 > $2 {print $3}' file
# Print line if column 3 > column 2:
awk '$3 > $2' file
Vijay Kumar E R – 98486 11007
34
35. # Count number of lines where col3 >col 1
awk '$3 > $1 {print i + "1"; i++}' file
# Print sequence number and then column 1 of file:
awk '{print NR, $1}' file
# Print every line after erasing the 2nd field
awk '{$2 = ""; print}' file
# Print hi 28 times
yes | head -28 | awk '{ print "hi" }'
# Print hi.0010 to hi.0099 (NOTE IRAF USERS!)
yes | head -90 | awk '{printf("hi00%2.0f n",
NR+9)}'
# Replace every field by its absolute value
{ for (i = 1; i <= NF; i=i+1) if ($i < 0)
$i = -$i print}
# If you have another character that delimits
fields, use the -F option
# For example, to print out the phone number for
Jones in the following file,
# 000902|Beavis|Theodore|333-242-2222|149092
# 000901|Jones|Bill|532-382-0342|234023
# ...
# type
awk -F"|" '$2=="Jones"{print $4}' filename
# Some looping for printouts
BEGIN{
for (i=875;i>833;i--){
printf "lprm -Plw %dn", i
} exit
}
Formatted printouts are of the form printf(
"formatn", value1, value2, ... valueN)
Vijay Kumar E R – 98486 11007
35
36. e.g. printf("howdy %-8s What it is bro.
%.2fn", $1, $2*$3)
%s = string
%-8s = 8 character string left justified
%.2f = number with 2 places after .
%6.2f = field 6 chars with 2 chars after .
n is newline
t is a tab
# Print frequency histogram of column of numbers
$2 <= 0.1 {na=na+1}
($2 > 0.1) && ($2 <= 0.2) {nb = nb+1}
($2 > 0.2) && ($2 <= 0.3) {nc = nc+1}
($2 > 0.3) && ($2 <= 0.4) {nd = nd+1}
($2 > 0.4) && ($2 <= 0.5) {ne = ne+1}
($2 > 0.5) && ($2 <= 0.6) {nf = nf+1}
($2 > 0.6) && ($2 <= 0.7) {ng = ng+1}
($2 > 0.7) && ($2 <= 0.8) {nh = nh+1}
($2 > 0.8) && ($2 <= 0.9) {ni = ni+1}
($2 > 0.9) {nj = nj+1}
END {print na, nb, nc, nd, ne, nf, ng, nh, ni, nj,
NR}
# Find maximum and minimum values present in
column 1
NR == 1 {m=$1 ; p=$1}
$1 >= m {m = $1}
$1 <= p {p = $1}
END { print "Max = " m, " Min = " p }
# Example of defining variables, multiple
commands on one line
NR == 1 {prev=$4; preva = $1; prevb = $2; n=0;
sum=0}
$4 != prev {print preva, prevb, prev, sum/n; n=0;
sum=0; prev = $4; preva = $1; prevb = $2}
$4 == prev {n++; sum=sum+$5/$6}
END {print preva, prevb, prev, sum/n}
# Example of using substrings
# substr($2,9,7) picks out characters 9 thru 15 of
column 2
{print "imarith", substr($2,1,7) " - " $3,
"out."substr($2,5,3)}
Vijay Kumar E R – 98486 11007
36
37. {print "imarith", substr($2,9,7) " - " $3,
"out."substr($2,13,3)}
{print "imarith", substr($2,17,7) " - " $3,
"out."substr($2,21,3)}
print "imarith", substr($2,25,7) " - " $3,
"out."substr($2,29,3)}
1. Renaming within the name:
ls -1 *old* | awk '{print "mv "$1" "$1}' | sed
s/old/new/2 | sh
(although in some cases it will fail, as in file_old_and_old)
2. Remove only files:
ls -l * | grep -v drwx | awk '{print "rm "$9}' | sh
or with awk alone:
ls -l|awk '$1!~/^drwx/{print $9}'|xargs rm
Be careful when trying this out in your home directory. We remove files!
3. Remove only directories
ls -l | grep '^d' | awk '{print "rm -r "$9}' | sh
or
ls -p | grep /$ | wk '{print "rm -r "$1}'
or with awk alone:
ls -l|awk '$1~/^d.*x/{print $9}'|xargs rm -r
Be careful when trying this out in your home directory. We remove things!
4. Killing processes by name (in this example we kill the process called netscape):
kill `ps auxww | grep netscape | egrep -v grep | awk
'{print $2}'`
Environment Control
Vijay Kumar E R – 98486 11007
37
38. Command Description
cd d Change to directory d
mkdir d Create new directory d
rmdir d Remove directory d
mv f1 [f2...] d Move file f to directory d
mv d1 d2 Rename directory d1 as d2
passwd Change password
alias name1 name2 Create command alias (csh/tcsh)
alias name1="name2" Create command alias (ksh/bash)
unalias name1[na2...] Remove command alias na
ssh nd Login securely to remote node
exit End terminal session
setenv name v Set env var to value v (csh/tcsh)
export name="v" Set environment variable to value
v(ksh/bash)
Output, Communication, & Help
Command Description
lpr -P printer f
or
lp -d printer f Output file f to line printer
script [f] Save terminal session to f
exit Stop saving terminal session
mailx username Send mail to user
man name Unix manual entry for name
Process Control
Vijay Kumar E R – 98486 11007
38
39. Command Description
CTRL/c * Interrupt processes
CTRL/s * Stop screen scrolling
CTRL/q * Resume screen output
sleep n Sleep for n seconds
jobs Print list of jobs
kill % Kill job n
ps Print process status stats
kill -9 n Remove process n
CTRL/z * Suspend current process
stop %n Suspend background job n
cmmd& Run cmmd in background
bg [%n] Resume background job n
fg [%n] Resume foreground job n
exit Exit from shell
Environment Status
Command Description
ls [d] [f...] List files in directory
ls -1 [f...] List files in detail
alias [name] Display command aliases
printenv [name] Print environment values
quota Display disk quota
date Print date & time
Vijay Kumar E R – 98486 11007
39
40. who List logged in users
whoami Display current user
finger [username] Output user information
chfn Change finger information
pwd Print working directory
history Display recent commands
! n Submit recent command n
File Manipulation
Command Description
vi [f] Vi full screen editor
emacs [f] Emacs full screen editor
ed [f] Text editor
wc f Line, word, & char count
cat f List contents of file
more f List file contents by screen
cat f1 f2 >f3 Concatenates f1 & f2 into f3
chmod mode f Change protection mode of f
cmp f1 f2 Compare two files
cp f1 f2 Copy file f1 into f2
sort f Alphabetically sort f
split [-n] f Split f into n-line pieces
mv f1 f2 Rename file f1 as f2
rm f Delete (remove) file f
Vijay Kumar E R – 98486 11007
40
41. grep 'ptn' f Outputs lines that match ptn
diff f1 f2 Lists file differences
head f Output beginning of f
tail f Output end of f
Compiler
Command Description
cc [-o f1] f2 C compiler
lint f Check C code for errors
f77 [-o f1] f2 Fortran77 compiler
pc [-o f1] f2 Pascal compiler
Abbreviations used in this document
CTRL/x hold down control key and press x
d directory
env environment
f filename
n number
nd computer node
prtr printer
ptn pattern
var variable
[y/n] yes or no
Vijay Kumar E R – 98486 11007
41