Linux has a multi-layered system organization with applications and utilities at the outer layer, a kernel interacting directly with hardware at the inner layer, and a middle layer like desktops and shells facilitating communication. It provides multi-user access with login security and file/folder permissions. Common commands to manage files/folders include ls to list, touch/cat to create/edit, cp to copy, mv to move, rm to delete, and chmod to change permissions. The file system hierarchy has directories like home, bin, lib, etc. Disk space is allocated in blocks and inodes track file attributes.
The document provides an overview of essential Linux commands and programs for navigating the file system, examining and managing files, and accessing utilities and documentation. It discusses the development of UNIX and Linux, basic commands for executing utilities like date and hostname, passing arguments to utilities, listing processes with ps, and redirecting outputs. It also covers navigating directories, copying, moving, removing files, and deciphering error messages.
- Linux originated as a clone of the UNIX operating system. Key developers included Linus Torvalds and developers from the GNU project.
- Linux is open source, multi-user, and can run on a variety of hardware. It includes components like the Linux kernel, shell, terminal emulator, and desktop environments.
- The document provides information on common Linux commands, files, users/groups, permissions, and startup scripts. It describes the Linux file system and compression/archiving utilities.
The document provides information on various features and commands in the UNIX operating system. It discusses multi-user and multi-tasking capabilities, the building block approach, and the UNIX tool kit. It also describes locating commands, internal and external commands, command structure, general purpose utilities like cal, date, echo, and bc. The document outlines file types, file names, directory commands, file commands, permissions, and vi editor basics.
The document provides an overview of basic Linux commands organized into categories such as file handling, text processing, system administration, process management, archival, network, file systems, and advanced commands. It describes the purpose and usage of common commands like ls, cd, cp, grep, kill, tar, ssh, mount, and more. It also lists resources for learning Linux commands like man pages, books, and the internet.
This document provides an introduction to basic Linux commands and file system concepts. It lists common commands like ls, pwd, cat, and their usage. It covers directory structure, permissions, and how to set user and group permissions. It also shows how to create symbolic links, delete and create files and directories. Finally, it demonstrates how to set the temporary and permanent hostname and create a basic client-server network with two machines.
Course 102: Lecture 16: Process Management (Part 2) Ahmed El-Arabawy
This lecture continues to introduce concepts about processes in Linux. It describes both Automatic processes and Daemon Processes.
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
Unix , Linux Commands
Unix, which is not an acronym, was developed by some of the members of the Multics team at the bell labs starting in the late 1960's by many of the same people who helped create the C programming language.
This lecture covers the structure of the Linux filesystem layout and the concept of mounting different filesystems in the main filesystem
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
The document provides an overview of essential Linux commands and programs for navigating the file system, examining and managing files, and accessing utilities and documentation. It discusses the development of UNIX and Linux, basic commands for executing utilities like date and hostname, passing arguments to utilities, listing processes with ps, and redirecting outputs. It also covers navigating directories, copying, moving, removing files, and deciphering error messages.
- Linux originated as a clone of the UNIX operating system. Key developers included Linus Torvalds and developers from the GNU project.
- Linux is open source, multi-user, and can run on a variety of hardware. It includes components like the Linux kernel, shell, terminal emulator, and desktop environments.
- The document provides information on common Linux commands, files, users/groups, permissions, and startup scripts. It describes the Linux file system and compression/archiving utilities.
The document provides information on various features and commands in the UNIX operating system. It discusses multi-user and multi-tasking capabilities, the building block approach, and the UNIX tool kit. It also describes locating commands, internal and external commands, command structure, general purpose utilities like cal, date, echo, and bc. The document outlines file types, file names, directory commands, file commands, permissions, and vi editor basics.
The document provides an overview of basic Linux commands organized into categories such as file handling, text processing, system administration, process management, archival, network, file systems, and advanced commands. It describes the purpose and usage of common commands like ls, cd, cp, grep, kill, tar, ssh, mount, and more. It also lists resources for learning Linux commands like man pages, books, and the internet.
This document provides an introduction to basic Linux commands and file system concepts. It lists common commands like ls, pwd, cat, and their usage. It covers directory structure, permissions, and how to set user and group permissions. It also shows how to create symbolic links, delete and create files and directories. Finally, it demonstrates how to set the temporary and permanent hostname and create a basic client-server network with two machines.
Course 102: Lecture 16: Process Management (Part 2) Ahmed El-Arabawy
This lecture continues to introduce concepts about processes in Linux. It describes both Automatic processes and Daemon Processes.
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
Unix , Linux Commands
Unix, which is not an acronym, was developed by some of the members of the Multics team at the bell labs starting in the late 1960's by many of the same people who helped create the C programming language.
This lecture covers the structure of the Linux filesystem layout and the concept of mounting different filesystems in the main filesystem
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 information about managing shared libraries in Linux. It discusses:
- Shared libraries allow common code to be reused across applications to reduce duplication. Applications may link dynamically or statically to libraries.
- Linux systems store shared libraries in paths like /lib and /usr/lib. Libraries have a naming convention like libname-version.so and libname.so symlinks.
- The ldd command shows which libraries an application requires. Libraries can also depend on other libraries.
- The ldconfig command processes the /etc/ld.so.conf file to create the ld.so.cache file, which records library locations.
- The LD_LIBRARY_PATH variable can set non-standard library paths
This document provides an overview of various Unix/Linux commands and concepts. It discusses the introduction to Unix including defining an operating system and its functionalities. It describes the evolution and structure of Unix. It covers usage of simple commands like date, who, ls and file commands like cat, cp, mv etc. It explains the Unix file system hierarchy and concepts like input/output redirection and wildcards. It also discusses environmental variables, file permissions and commands related to pipes and filters like sort and grep. Finally, it talks about editors like vi and shell programming concepts.
This lecture covers the handling of files and file management commands by Linux Subsystems. It also covers creating both Hard Links and Symbolic Links
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
Files are the building blocks of the UNIX operating system. There are different types of files like regular files, directories, FIFO files, character device files, and block device files. The UNIX kernel uses files, file descriptors, a file table, and an inode table to manage file input/output operations when a user executes a command. This allows processes to open, read, write, and close files.
After completing this section, students should be able to log into the Linux system, understand and manipulate the UNIX file system, describe the role of the shell, use basic file commands like cd, ls, cp, and rm, use standard input/output and piping, and understand the UNIX philosophy. The document provides an introduction to UNIX operating systems, shells, file systems, basic commands, and input/output redirection.
This document provides an overview of shell programming and scripting languages. It discusses the responsibilities of shells, including customizing the work environment, automating tasks, and executing system procedures. Key shell concepts covered include pipes, input/output redirection, variables, control structures, arithmetic, functions, and debugging scripts. The document also describes common shell types like Bourne, C, Korn, and Bash shells and provides examples of using meta characters, variables, condition tests, and control statements in shell scripts.
This document provides an overview and outline of Session 2 for the L2B Linux First Course. It covers Linux principles including the concept that everything is a file, Bash basics such as command syntax and navigation, and users/groups/permissions including file ownership and permissions. It also briefly introduces Bash scripts, describing them as files containing commands and the process to create and execute a script.
This document provides an overview of the Linux operating system and commands. It begins with course objectives to introduce Unix concepts, commands, and the VI editor. It then discusses what an operating system is and why they are needed before exploring the evolution, flavors, and architecture of Unix/Linux. Key topics covered include the file system structure, absolute vs relative paths, how Unix sessions work, login sequences, command syntax, and standard input/output/error. The document also examines regular expressions, shell metacharacters, editors like VI, and permissions.
Unix is a layered operating system with the kernel interacting directly with hardware and providing services to user programs through system calls. It is a multi-user, multi-tasking system with a hierarchical file structure and standard commands for manipulating files and directories. The shell acts as a command interpreter between the user and operating system, running commands and startup scripts on startup.
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 of and Unix and Command. More presentation you can find on www.scmGalaxy.com.
scmGalaxy.com is dedicated to software configuration, build and Release management. This covers CVS, VSS (Visual Source Safe),Perforce, SVN(Subversion) MKS Integrity, ClearCase,TFS,CM Synergy, Best Practices ,AnthillPro, Apache Ant, Maven, Bamboo, Cruise Control and many more tools.
The document provides an overview of Linux operating system concepts including:
- Linux is an open source operating system that interacts with hardware and allocates resources.
- It supports multi-tasking and multi-user environments. Common types include Debian, Ubuntu, and Redhat.
- Key components include the kernel, shell programs, file management commands, text editors, browsers, and programming tools.
The document provides descriptions of various Linux commands for basic usage and pentesting. It describes commands for making directories (mkdir), deleting empty directories (rmdir), viewing processes (ps), checking username (whoami), checking disk space (df), displaying date and time (date), checking connectivity (ping), downloading files (wget), looking up domain registration records (whois), navigating directories (cd), listing directory contents (ls), displaying command manuals (man), displaying text files (cat), copying files (cp), moving and renaming files (mv), removing files and directories (rm), creating empty files (touch), searching files (grep), using administrative privileges (sudo), viewing start of files (head), viewing end of files (
The document provides an overview of various Unix/Linux command line concepts across 5 chapters. It describes commands for listing files and directories (ls), creating directories (mkdir), changing directories (cd), viewing the current directory (pwd), copying, moving and removing files (cp, mv, rm), searching files (grep), viewing processes (ps), running jobs in background (&), managing jobs (jobs, fg, bg) and killing processes (kill). It also covers file permissions (chmod), symbolic and hard links (ln), input/output redirection (> ,|), piping (|) and getting help (man, whatis).
Connecting to a Linux system involves opening a terminal which displays the current directory, host, and shell prompt. The shell interprets commands and communicates with the Linux kernel. Common shells include bash, csh, korn, and tcsh. Basic commands like ls list files, cd changes directories, and man provides command help. File permissions control user, group, and world access to read, write, or execute files. Pipes allow output from one command to serve as input to another.
The document provides an overview of the history and development of the UNIX operating system from 1965 to 1983. It describes how UNIX originated from the Multics project at Bell Labs and MIT in 1965. It was further developed by AT&T in the 1970s and rewritten in C by Dennis Ritchie in 1973. The document also discusses the development of BSD and System V UNIX variants in the 1980s.
The document discusses various topics related to Linux administration. It covers Unix system architecture, the Linux command line, files and directories, running programs, wildcards, text editors, shells, command syntax, filenames, command history, paths, hidden files, home directories, making directories, copying and renaming files, and more. It provides an overview of key Linux concepts and commands for system administration.
Linux is an open-source operating system developed by Linus Torvalds in 1991. It has a reputation for being efficient and fast-performing. The document then lists and describes 50 common Linux commands, including their syntax and usage. Examples include commands for changing directories, copying files, displaying the date/time, searching files with grep, and more.
This document discusses basic file permissions in Linux/Unix. It covers the different file attributes seen in the ls -l command output including permissions, owner, group, size and date. It describes the rwx permissions for owner, group and others. It also explains how to modify permissions using chmod with absolute and symbolic modes, and how to change file ownership with chown.
Linux Administration in this basic commands are there & also advanced commands are also there,It will be very use full for everyone who are all intrested in learning Linux,Which means everyone learn Linux esaliy.
The document discusses browsing and navigating the Linux file system. It describes the hierarchical structure with directories, sub-directories, and files. Everything is represented as a file, including processes, devices, applications, and sockets. Directories can contain other directories and files. The root directory is represented by "/" and mount points allow connecting other file systems. Commands like ls, cd, pwd are used to list, change directories, and print the working directory path. File permissions and attributes are displayed using ls -l.
This document provides information about managing shared libraries in Linux. It discusses:
- Shared libraries allow common code to be reused across applications to reduce duplication. Applications may link dynamically or statically to libraries.
- Linux systems store shared libraries in paths like /lib and /usr/lib. Libraries have a naming convention like libname-version.so and libname.so symlinks.
- The ldd command shows which libraries an application requires. Libraries can also depend on other libraries.
- The ldconfig command processes the /etc/ld.so.conf file to create the ld.so.cache file, which records library locations.
- The LD_LIBRARY_PATH variable can set non-standard library paths
This document provides an overview of various Unix/Linux commands and concepts. It discusses the introduction to Unix including defining an operating system and its functionalities. It describes the evolution and structure of Unix. It covers usage of simple commands like date, who, ls and file commands like cat, cp, mv etc. It explains the Unix file system hierarchy and concepts like input/output redirection and wildcards. It also discusses environmental variables, file permissions and commands related to pipes and filters like sort and grep. Finally, it talks about editors like vi and shell programming concepts.
This lecture covers the handling of files and file management commands by Linux Subsystems. It also covers creating both Hard Links and Symbolic Links
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
Files are the building blocks of the UNIX operating system. There are different types of files like regular files, directories, FIFO files, character device files, and block device files. The UNIX kernel uses files, file descriptors, a file table, and an inode table to manage file input/output operations when a user executes a command. This allows processes to open, read, write, and close files.
After completing this section, students should be able to log into the Linux system, understand and manipulate the UNIX file system, describe the role of the shell, use basic file commands like cd, ls, cp, and rm, use standard input/output and piping, and understand the UNIX philosophy. The document provides an introduction to UNIX operating systems, shells, file systems, basic commands, and input/output redirection.
This document provides an overview of shell programming and scripting languages. It discusses the responsibilities of shells, including customizing the work environment, automating tasks, and executing system procedures. Key shell concepts covered include pipes, input/output redirection, variables, control structures, arithmetic, functions, and debugging scripts. The document also describes common shell types like Bourne, C, Korn, and Bash shells and provides examples of using meta characters, variables, condition tests, and control statements in shell scripts.
This document provides an overview and outline of Session 2 for the L2B Linux First Course. It covers Linux principles including the concept that everything is a file, Bash basics such as command syntax and navigation, and users/groups/permissions including file ownership and permissions. It also briefly introduces Bash scripts, describing them as files containing commands and the process to create and execute a script.
This document provides an overview of the Linux operating system and commands. It begins with course objectives to introduce Unix concepts, commands, and the VI editor. It then discusses what an operating system is and why they are needed before exploring the evolution, flavors, and architecture of Unix/Linux. Key topics covered include the file system structure, absolute vs relative paths, how Unix sessions work, login sequences, command syntax, and standard input/output/error. The document also examines regular expressions, shell metacharacters, editors like VI, and permissions.
Unix is a layered operating system with the kernel interacting directly with hardware and providing services to user programs through system calls. It is a multi-user, multi-tasking system with a hierarchical file structure and standard commands for manipulating files and directories. The shell acts as a command interpreter between the user and operating system, running commands and startup scripts on startup.
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 of and Unix and Command. More presentation you can find on www.scmGalaxy.com.
scmGalaxy.com is dedicated to software configuration, build and Release management. This covers CVS, VSS (Visual Source Safe),Perforce, SVN(Subversion) MKS Integrity, ClearCase,TFS,CM Synergy, Best Practices ,AnthillPro, Apache Ant, Maven, Bamboo, Cruise Control and many more tools.
The document provides an overview of Linux operating system concepts including:
- Linux is an open source operating system that interacts with hardware and allocates resources.
- It supports multi-tasking and multi-user environments. Common types include Debian, Ubuntu, and Redhat.
- Key components include the kernel, shell programs, file management commands, text editors, browsers, and programming tools.
The document provides descriptions of various Linux commands for basic usage and pentesting. It describes commands for making directories (mkdir), deleting empty directories (rmdir), viewing processes (ps), checking username (whoami), checking disk space (df), displaying date and time (date), checking connectivity (ping), downloading files (wget), looking up domain registration records (whois), navigating directories (cd), listing directory contents (ls), displaying command manuals (man), displaying text files (cat), copying files (cp), moving and renaming files (mv), removing files and directories (rm), creating empty files (touch), searching files (grep), using administrative privileges (sudo), viewing start of files (head), viewing end of files (
The document provides an overview of various Unix/Linux command line concepts across 5 chapters. It describes commands for listing files and directories (ls), creating directories (mkdir), changing directories (cd), viewing the current directory (pwd), copying, moving and removing files (cp, mv, rm), searching files (grep), viewing processes (ps), running jobs in background (&), managing jobs (jobs, fg, bg) and killing processes (kill). It also covers file permissions (chmod), symbolic and hard links (ln), input/output redirection (> ,|), piping (|) and getting help (man, whatis).
Connecting to a Linux system involves opening a terminal which displays the current directory, host, and shell prompt. The shell interprets commands and communicates with the Linux kernel. Common shells include bash, csh, korn, and tcsh. Basic commands like ls list files, cd changes directories, and man provides command help. File permissions control user, group, and world access to read, write, or execute files. Pipes allow output from one command to serve as input to another.
The document provides an overview of the history and development of the UNIX operating system from 1965 to 1983. It describes how UNIX originated from the Multics project at Bell Labs and MIT in 1965. It was further developed by AT&T in the 1970s and rewritten in C by Dennis Ritchie in 1973. The document also discusses the development of BSD and System V UNIX variants in the 1980s.
The document discusses various topics related to Linux administration. It covers Unix system architecture, the Linux command line, files and directories, running programs, wildcards, text editors, shells, command syntax, filenames, command history, paths, hidden files, home directories, making directories, copying and renaming files, and more. It provides an overview of key Linux concepts and commands for system administration.
Linux is an open-source operating system developed by Linus Torvalds in 1991. It has a reputation for being efficient and fast-performing. The document then lists and describes 50 common Linux commands, including their syntax and usage. Examples include commands for changing directories, copying files, displaying the date/time, searching files with grep, and more.
This document discusses basic file permissions in Linux/Unix. It covers the different file attributes seen in the ls -l command output including permissions, owner, group, size and date. It describes the rwx permissions for owner, group and others. It also explains how to modify permissions using chmod with absolute and symbolic modes, and how to change file ownership with chown.
Linux Administration in this basic commands are there & also advanced commands are also there,It will be very use full for everyone who are all intrested in learning Linux,Which means everyone learn Linux esaliy.
The document discusses browsing and navigating the Linux file system. It describes the hierarchical structure with directories, sub-directories, and files. Everything is represented as a file, including processes, devices, applications, and sockets. Directories can contain other directories and files. The root directory is represented by "/" and mount points allow connecting other file systems. Commands like ls, cd, pwd are used to list, change directories, and print the working directory path. File permissions and attributes are displayed using ls -l.
Unix Shell Script - 2 Days Session.pptxRajesh Kumar
The document provides an overview of Unix and shell scripting. It discusses what Unix is, its architecture including the kernel, shell, commands, and filesystem. It then covers what shell scripts are, their components and syntax. The document provides examples of shell script code and discusses how to invoke scripts, execute them in background, and useful metacharacters. It also covers various Unix commands like ls, cd, grep, find and their usage.
This document provides an overview and agenda for a 5-day UNIX/Linux training course. The training will cover Linux installations, desktops, command line administration, networking, and server/programming. Each day focuses on a different topic area. Day 1 is an introduction and installation. Day 2 covers Linux desktops and administration. Day 3 is Linux CLI administration. Day 4 is networking and internet. Day 5 is Linux servers and programming. The document also includes background information on Linux and UNIX as well as tips for Linux installations, file systems, users, commands, and performance.
The document provides an introduction to Linux, including its history and origins. It discusses how Linux was originally developed by Linus Torvalds as an open source alternative to UNIX. It also summarizes some key Linux distributions like Red Hat Linux and describes basic Linux commands, file structures, and permissions.
This document provides an overview of UNIX and Linux fundamentals for high-performance computing. It discusses the history and development of UNIX and Linux, including key events and figures. It also covers basic system commands, directories, permissions, users, processes and program execution. Finally, it discusses editing files and advanced program options for working more efficiently in UNIX and Linux environments.
This document provides an overview of Linux commands and basics. It begins with explaining Linux command line syntax and standard options. It then covers commands for checking system information like CPU, memory, disks. Directories, files, permissions and various file management commands like copy, move, delete are explained. Commands for viewing file contents like cat, head, tail and filters like grep, awk are summarized. The vim text editor and finding files using find and locate commands are briefly described. Process management using ps and kill is covered. User and group administration using useradd, groupadd and sudo is highlighted at the end.
The document provides information about various components of an operating system including:
- The kernel acts as an interface between hardware and software, allocating resources and managing tasks.
- Operating systems support single/multi-user and single/multi-tasking capabilities.
- Linux is an open source, multi-user operating system based on the Unix kernel that is used widely today.
LInux: Basics & File System:The Unix operating system was conceived and implemented in 1969 at AT&T's Bell Laboratories in the United States by Ken Thompson, Dennis Ritchie, Douglas McIlroy, and Joe Ossanna. First released in 1971, Unix was written entirely in assembly language, as was common practice at the time. Later, in a key pioneering approach in 1973, it was rewritten in the C programming language by Dennis Ritchie (with exceptions to the kernel and I/O). The availability of a high-level language implementation of Unix made its porting to different computer platforms easier.
1) The document discusses file attributes and permissions in Linux/Unix systems. It describes the ls command and its options to view file details like type, permissions, owner, size etc.
2) It explains how to change file permissions using chmod and change ownership using chown/chgrp commands. Directories require write permission to add/remove files.
3) The shell interprets commands, expands wildcards, executes the command and waits for next user input, repeating its cycle. Wildcards like * and ? and character classes help match multiple filenames.
The document provides an overview of the Linux file system structure and common Linux commands. It describes that in Linux, everything is treated as a file, including devices, pipes and directories. It explains the different types of files and partitions in Linux, and provides examples of common file manipulation and system monitoring commands.
Shell scripting and Linux commands that are useful for work are covered in the document. Some key points include:
- A shell script is a list of commands that can be executed by the shell to perform operations like running programs, manipulating files, and printing text. Common shell scripts include Bash, CSH, and KSH.
- Benefits of shell scripts include reusability, readability, and the ability to leverage powerful UNIX tools like awk, grep, and sed.
- The document outlines several basic Linux commands for file/directory navigation, permissions, and more. It also covers useful network administration commands and environment variables.
The Unix operating system acts as an interface between the user and computer. The kernel allocates system resources, coordinates internals, and interacts with hardware. Users communicate with the kernel via a shell program that translates commands for the kernel to understand. In Unix, everything is organized into files that are grouped into directories in a tree structure called the filesystem. Common commands allow users to view files and directories, check system information, manage files and directories, and get manual pages.
CompTIA Linux+ Powered by LPI certifies foundational skills and knowledge of Linux. With Linux being the central operating system for much of the world’s IT infrastructure, Linux+ is an essential credential for individuals working in IT, especially those on the path of a Web and software development career. With CompTIA’s Linux+ Powered by LPI certification, you’ll acquire the fundamental skills and knowledge you need to successfully configure, manage and troubleshoot Linux systems. Recommended experience for this certification includes CompTIA A+, CompTIA Network+ and 12 months of Linux admin experience. No prerequisites required.
This document discusses key concepts related to file system interfaces including:
1) File systems provide a logical representation of files and directories that can be accessed through defined operations like create, read, write, delete.
2) Files can be organized using different structures like sequential access, direct access, and indexed/relative files. Directories provide a way to group related files in a hierarchical structure.
3) File sharing, protection, and consistency models are important aspects of how multiple users can concurrently access the same files in a file system.
The document provides an introduction to Linux, including that it is an open-source operating system kernel created by Linus Torvalds. It discusses popular Linux distributions like Ubuntu and Red Hat Enterprise Linux. It also describes the Linux shell/terminal as the command line interface to interact with the operating system. Finally, it gives examples of common Linux commands for file management, system information, and archiving/compressing files.
The document provides an overview of Linux fundamentals, including:
- The Linux filesystem hierarchy and important files/folders like /etc, /bin, and /home.
- Commands for navigating the filesystem like cd, ls, and mkdir.
- Commands for working with files like touch, cp, mv, rm, cat, and nano.
- Finding files using commands like find and grep.
- Viewing and changing file permissions with ls, chown, chmod, and sudo.
This document discusses managing the Linux file system. It describes the Linux file system structure, including the main directories like /bin, /home, /etc. It also covers common file system tasks like navigating directories, managing files and directories by creating, deleting, copying and moving files. Additional topics covered include managing disk partitions by creating partitions with fdisk and formatting partitions with file systems using mkfs, mounting partitions, and checking file systems with fsck.
Trusted Execution Environment for Decentralized Process MiningLucaBarbaro3
Presentation of the paper "Trusted Execution Environment for Decentralized Process Mining" given during the CAiSE 2024 Conference in Cyprus on June 7, 2024.
5th LF Energy Power Grid Model Meet-up SlidesDanBrown980551
5th Power Grid Model Meet-up
It is with great pleasure that we extend to you an invitation to the 5th Power Grid Model Meet-up, scheduled for 6th June 2024. This event will adopt a hybrid format, allowing participants to join us either through an online Mircosoft Teams session or in person at TU/e located at Den Dolech 2, Eindhoven, Netherlands. The meet-up will be hosted by Eindhoven University of Technology (TU/e), a research university specializing in engineering science & technology.
Power Grid Model
The global energy transition is placing new and unprecedented demands on Distribution System Operators (DSOs). Alongside upgrades to grid capacity, processes such as digitization, capacity optimization, and congestion management are becoming vital for delivering reliable services.
Power Grid Model is an open source project from Linux Foundation Energy and provides a calculation engine that is increasingly essential for DSOs. It offers a standards-based foundation enabling real-time power systems analysis, simulations of electrical power grids, and sophisticated what-if analysis. In addition, it enables in-depth studies and analysis of the electrical power grid’s behavior and performance. This comprehensive model incorporates essential factors such as power generation capacity, electrical losses, voltage levels, power flows, and system stability.
Power Grid Model is currently being applied in a wide variety of use cases, including grid planning, expansion, reliability, and congestion studies. It can also help in analyzing the impact of renewable energy integration, assessing the effects of disturbances or faults, and developing strategies for grid control and optimization.
What to expect
For the upcoming meetup we are organizing, we have an exciting lineup of activities planned:
-Insightful presentations covering two practical applications of the Power Grid Model.
-An update on the latest advancements in Power Grid -Model technology during the first and second quarters of 2024.
-An interactive brainstorming session to discuss and propose new feature requests.
-An opportunity to connect with fellow Power Grid Model enthusiasts and users.
GraphRAG for Life Science to increase LLM accuracyTomaz Bratanic
GraphRAG for life science domain, where you retriever information from biomedical knowledge graphs using LLMs to increase the accuracy and performance of generated answers
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3Data Hops
Free A4 downloadable and printable Cyber Security, Social Engineering Safety and security Training Posters . Promote security awareness in the home or workplace. Lock them Out From training providers datahops.com
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc
How does your privacy program stack up against your peers? What challenges are privacy teams tackling and prioritizing in 2024?
In the fifth annual Global Privacy Benchmarks Survey, we asked over 1,800 global privacy professionals and business executives to share their perspectives on the current state of privacy inside and outside of their organizations. This year’s report focused on emerging areas of importance for privacy and compliance professionals, including considerations and implications of Artificial Intelligence (AI) technologies, building brand trust, and different approaches for achieving higher privacy competence scores.
See how organizational priorities and strategic approaches to data security and privacy are evolving around the globe.
This webinar will review:
- The top 10 privacy insights from the fifth annual Global Privacy Benchmarks Survey
- The top challenges for privacy leaders, practitioners, and organizations in 2024
- Key themes to consider in developing and maintaining your privacy program
Have you ever been confused by the myriad of choices offered by AWS for hosting a website or an API?
Lambda, Elastic Beanstalk, Lightsail, Amplify, S3 (and more!) can each host websites + APIs. But which one should we choose?
Which one is cheapest? Which one is fastest? Which one will scale to meet our needs?
Join me in this session as we dive into each AWS hosting service to determine which one is best for your scenario and explain why!
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...alexjohnson7307
Predictive maintenance is a proactive approach that anticipates equipment failures before they happen. At the forefront of this innovative strategy is Artificial Intelligence (AI), which brings unprecedented precision and efficiency. AI in predictive maintenance is transforming industries by reducing downtime, minimizing costs, and enhancing productivity.
This presentation provides valuable insights into effective cost-saving techniques on AWS. Learn how to optimize your AWS resources by rightsizing, increasing elasticity, picking the right storage class, and choosing the best pricing model. Additionally, discover essential governance mechanisms to ensure continuous cost efficiency. Whether you are new to AWS or an experienced user, this presentation provides clear and practical tips to help you reduce your cloud costs and get the most out of your budget.
Building Production Ready Search Pipelines with Spark and MilvusZilliz
Spark is the widely used ETL tool for processing, indexing and ingesting data to serving stack for search. Milvus is the production-ready open-source vector database. In this talk we will show how to use Spark to process unstructured data to extract vector representations, and push the vectors to Milvus vector database for search serving.
Skybuffer SAM4U tool for SAP license adoptionTatiana Kojar
Manage and optimize your license adoption and consumption with SAM4U, an SAP free customer software asset management tool.
SAM4U, an SAP complimentary software asset management tool for customers, delivers a detailed and well-structured overview of license inventory and usage with a user-friendly interface. We offer a hosted, cost-effective, and performance-optimized SAM4U setup in the Skybuffer Cloud environment. You retain ownership of the system and data, while we manage the ABAP 7.58 infrastructure, ensuring fixed Total Cost of Ownership (TCO) and exceptional services through the SAP Fiori interface.
Introduction of Cybersecurity with OSS at Code Europe 2024Hiroshi SHIBATA
I develop the Ruby programming language, RubyGems, and Bundler, which are package managers for Ruby. Today, I will introduce how to enhance the security of your application using open-source software (OSS) examples from Ruby and RubyGems.
The first topic is CVE (Common Vulnerabilities and Exposures). I have published CVEs many times. But what exactly is a CVE? I'll provide a basic understanding of CVEs and explain how to detect and handle vulnerabilities in OSS.
Next, let's discuss package managers. Package managers play a critical role in the OSS ecosystem. I'll explain how to manage library dependencies in your application.
I'll share insights into how the Ruby and RubyGems core team works to keep our ecosystem safe. By the end of this talk, you'll have a better understanding of how to safeguard your code.
Best 20 SEO Techniques To Improve Website Visibility In SERPPixlogix Infotech
Boost your website's visibility with proven SEO techniques! Our latest blog dives into essential strategies to enhance your online presence, increase traffic, and rank higher on search engines. From keyword optimization to quality content creation, learn how to make your site stand out in the crowded digital landscape. Discover actionable tips and expert insights to elevate your SEO game.
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...Alex Pruden
Folding is a recent technique for building efficient recursive SNARKs. Several elegant folding protocols have been proposed, such as Nova, Supernova, Hypernova, Protostar, and others. However, all of them rely on an additively homomorphic commitment scheme based on discrete log, and are therefore not post-quantum secure. In this work we present LatticeFold, the first lattice-based folding protocol based on the Module SIS problem. This folding protocol naturally leads to an efficient recursive lattice-based SNARK and an efficient PCD scheme. LatticeFold supports folding low-degree relations, such as R1CS, as well as high-degree relations, such as CCS. The key challenge is to construct a secure folding protocol that works with the Ajtai commitment scheme. The difficulty, is ensuring that extracted witnesses are low norm through many rounds of folding. We present a novel technique using the sumcheck protocol to ensure that extracted witnesses are always low norm no matter how many rounds of folding are used. Our evaluation of the final proof system suggests that it is as performant as Hypernova, while providing post-quantum security.
Paper Link: https://eprint.iacr.org/2024/257
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyScyllaDB
Freshworks creates AI-boosted business software that helps employees work more efficiently and effectively. Managing data across multiple RDBMS and NoSQL databases was already a challenge at their current scale. To prepare for 10X growth, they knew it was time to rethink their database strategy. Learn how they architected a solution that would simplify scaling while keeping costs under control.
Generating privacy-protected synthetic data using Secludy and MilvusZilliz
During this demo, the founders of Secludy will demonstrate how their system utilizes Milvus to store and manipulate embeddings for generating privacy-protected synthetic data. Their approach not only maintains the confidentiality of the original data but also enhances the utility and scalability of LLMs under privacy constraints. Attendees, including machine learning engineers, data scientists, and data managers, will witness first-hand how Secludy's integration with Milvus empowers organizations to harness the power of LLMs securely and efficiently.
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Tatiana Kojar
Skybuffer AI, built on the robust SAP Business Technology Platform (SAP BTP), is the latest and most advanced version of our AI development, reaffirming our commitment to delivering top-tier AI solutions. Skybuffer AI harnesses all the innovative capabilities of the SAP BTP in the AI domain, from Conversational AI to cutting-edge Generative AI and Retrieval-Augmented Generation (RAG). It also helps SAP customers safeguard their investments into SAP Conversational AI and ensure a seamless, one-click transition to SAP Business AI.
With Skybuffer AI, various AI models can be integrated into a single communication channel such as Microsoft Teams. This integration empowers business users with insights drawn from SAP backend systems, enterprise documents, and the expansive knowledge of Generative AI. And the best part of it is that it is all managed through our intuitive no-code Action Server interface, requiring no extensive coding knowledge and making the advanced AI accessible to more users.
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Linuxnishustud
1. Features of Linux Operating System
• MultiUser Capability
• Multitasking Capability
• Communication
• Security
– Login Security
– File Security
• Portability- Easily portable
2. Linux System Organization
• Functioning of Linux is manned in three levels
– On outer crust reside the application programs and
other utilities
– At the heart of Linux is the kernel which interacts
with the actual hardware in machine language
– The streaming of these two modes of
communication is done by middle layer . This
middle layer can be desktops, window managers
and command line shells
– The shell or command interpreter as it is called is
the mediator which interprets the commands that
we give and then conveys them to the kernel which
ultimately executes them.
3. • Three major types of shells are there in Linux
• Bourne shell
• Korn shell
• C shell
Current versions of linux incorporate all the three
shells enabling you to work in any one of them.
When you start the system , you are placed in
Bourne shell. C shell is used only for the C
programming. Its prompt is %. Bourne shell can
tackle all the tasks of korn shell but not of C shell.
The default prompt of Bourne shell is $ for the user
and # for the administrator.
As an alternative to a command line interface, Linux
provides both desktops and window managers.
4. • When using command line interface, you are given a
simple prompt at which you type in your command.
The Prompt for the user is $ whereas for the
administrator the prompt is #.
• File structure of Linux. The file system of linux starts at
a directory called the root (/). Under the root directory
are various other directories as
• proc- kernel resides in proc
• bin- contains executable files
• lib- contains all library functions
• usr- All users are in usr directory
• etc- Binary executable files required for system
administration
• tmp- temporary files created by linux or users
• dev- Device related files
5. • /
proc bin lib dev usr tmp etc
user1 user2 user3
(Root)
6. • Block distribution of Disk
In linux, the hard disk is divided into different
blocks each of the size of a multiple of 512KB.
The various blocks are:
• Boot block- containing all the files for booting
• Super block- contains temporary and empty
files. Contains information regarding number of
files that can be included in a file system
• Inode block- contains inode numbers. Each file
in linux has a unique inode number. Also
contains file permission entries. For storing all
this information, an inode table is maintained in
inode block
• Data Block – contains all the user created files
7. • Creating a file
• Two commands are there for creating files
• touch
• cat
• touch <filename>- This command creates empty files. The
arguments can be more than one file at a time
• cat- This command is used for two purposes
– For displaying the contents of the file
– For entering data into the already created file
For entering data
cat > <filename> On entering this command, the cursor will be placed at
the line next to command line. After text entry is finished, press ctrl+d to
finish
• Cat command can also be used for concatenating two files.
• cat filename1 filename2 > newsample
• This would create newsample file which contains contents of
filename1 and filename2. if newsample contains the contents,
they will be overwritten.
8. • In order to append to the previous contents
“append output redirection operator”, >>, can
be used as
• cat file1 file2 >> newfile
• Copying a file- the copying of files is done in
linux using cp command
• cp source target
• If target file does not exist it will be created and
if it exists, it will be overwritten
cp source target directory
• The files will be copied to the directory. The
addresses mentioned can be complete address
or relative address
9. • The various options of cp command are:
• -i – for invoking cp in interactive mode.
• -r – this copies the entire directory structure
• Examples
• cp -i file1 file2
• cp –r directory1 directory2
10. • Command to remove the files from linux
• rm <filename>
• Options with rm command are:
• -i option- interactive mode. Asks for
confirmation to delete
• -r option –this command deletes directories and
subdirectories.
• rm –r dir1
• -f option- removes files forcibly
11. • Renaming of the files- the renaming of the files is
done using mv command. This command is also used
for moving the files from one location to another
• mv test sample
• mv command also has the power to rename
directories
mv olddir newdir
Provided newdir is not already existing.
A group of files can be moved to a new directory with
mv command
mv file1 file2 file3 file4 directory
The various directories are separated from each other
with a forward slash (/)
12. • Directory related commands-
• pwd- This command is used to see the present
working directory
$ pwd
• Creating directory in linux- The directory can be
created in linux with the command
• mkdir <directory name>
• Changing the directory- The user can shift from one
directory to another using cd command. cd command
can be used with both absolute and relative
pathnames. For absolute pathnames, we can start the
path with a forward slash (/).
• There is a better way to of navigation available for
moving between two directories with same ancestor.
13. • Linux offers a shortcut---the relative pathname---that
uses either the current or parent directory as reference
and specifies the path relative to it. A relative
pathname uses one of these symbols
• .(a single dot)---This represents the current directory
• ..(two dots)---This represents the parent directory
• Examples:
• cd .. – Moves the user to the parent of the current
directory.
• cd ../.. - Moves the user to the parent of the parent
of the current directory. Any number of .. Can be
combined in a cd command but they should be
separated by a ‘/ ‘ .
14. • cp /home/kumar/.profile .
• This copies the .profile file to the current
directory
• Every user, when login to a linux system is
allotted a home directory by the system. This
pathname is stored in /etc/passwd file.This
pathname can be seen using the echo
command
echo $HOME
HOME is the shell variable that knows the
home directory.
15. • Removing directory- The directories in linux are
removed using the command rmdir
• rmdir <directory name>
• The directory to be removed must be empty.
We can also remove multiple directories in one
shot
• rmdir pis/data pis/prog pis
• You can’t remove a directory until you are
placed in the directory hierarchically above the
one to be removed.
16. • ls – Listing directory contents
• ls command lists all filenames to current directory
• ls <filename>--- This command is to check whether
the filename exits or not
• ls options-
• ls has a very large number of options.
• -x – When you have several files, its better to display
the filenames in multiple columns.
• Identifying the directories and executables (-F). This
option lists the files with identification marks for files
and directories. Combining this option with –x
produces a multicolumnar output as well.
• ls –Fx
• The * indicates that file contains executable code and /
refers to the directory.
17. • -a – Shows the hidden files. These are the files
that begin with a dot. These files don’t show up
normally but they can be viewed with –a option.
• ls –axF
• -R– This option lists all the files and
subdirectories in a directory tree
• ls –xR
• -r – sorts the files in reverse order
• -1 – One filename in one line
• -d – Lists only dirname if dirname is a directory
• -t – Sorts filenames by last modification time.
• -i – Displays the inode numbers
18. • -l – listing file attributes. The –l option displays
seven attributes of a file
• Number of blocks occupied by these files in
the disk each of 512 bytes
• File type and permissions
• Links
• Ownership
• Group ownership
• File size
• Last modification time
• filename
19. • ls –l – this option of ls command is used for
displaying the attributes of the file. –l stands for
long. This option displays seven attributes of
each file and subdirectory in a particular
directory. The list is preceded by words total
72, which indicates the total number of blocks
these files are accommodating. Each block
consisting of 1024 bytes. The seven attributes
displayed by the option are :
• File permissions and type- the first column
shows the type and permissions associated
with each file. The first character in this column
is mostly a ‘–’ which indicates that the file is an
ordinary file. For directories, this entry is
represented by a character ‘d’.
20. • After this first character, there are series of
characters in this column that can take the
value r,w , x or - . These character represent
the various types of permissions associated
with a file. There are three types of permissions
that a file can have
• r – read permission
• w – write permission
• x – Executable permission
• Linux follows a three tiered file protection
system that determines a file’s access rights.
The permission string is thus broken down into
three groups. Each group here represent the
21. category and contains three slots, representing the
read, write and execute permissions of the file in that
order. The read permission allows the group to read
the file, w indicates write permission, you can edit
such a file with an editor, x indicates execute
permission, the file can be executed as a program.
The presence of – indicates the absence of
corresponding permission. The three groups indicated
in the listing are:
• Owner- The one who creates the file is the owner of
the file
• Group- When opening a user account, the system
administrator assigns the user to some group. Groups
can be seen in the file /etc/group (both group id and
group name)
• Others- Other is the one who is neither the owner of
the file nor belongs to the group.
22. • Links – the second column of the ls listing
represent the number of links associated with
the file. This is actually the number of filenames
maintained by the system of that file. Linux
allows a file to have many names even though
there is a single file on the disk.
• Ownership- The third column represent the
owner of the file (the one who created the file).
The owner has full authority to tamper with the
file’s contents and permissions---a privilege not
available with others except the root user.
Similarly, you can create, modify or remove
files in a directory if you are the owner of the
directory.
23. • Group ownership- This column represents the
name of the group to which the file belongs
• File size- The fifth column represents the size
of file in bytes i.e amount of data it contains. It
is actually character count of the file and not a
measure of the disk space that it occupies. The
directories show smaller file sizes. This is to be
expected as a directory maintains a list of
filenames with an identification number (inode
number) for each file. The size of the directory
file depends on the size of this list---whatever
be the size of the files themselves.
24. • Last modification time-the sixth, seventh and eighth
columns indicate the last modification time of the file
which is stored to the nearest second. A file is said to
be modified only if its contents have changed in any
way. If we change the permissions or ownership of the
file, the modification time remains unchanged.
• Filename- The last column displays the filenames
arranged in ASCII collating sequence.
25. • ls –d –To force ls to list the attributes of a
directory, rather than its contents, -d option can
be used.
• ls –ld <directoryname> <directoryname>
• Directories are easily identified from the list by
the first character of the first column, which
here shows a d.
• For device files, this first character is identified
as either b or c.
26. • Changing the file permissions- A file or
directory is created with default set of
permissions and this default is determined by a
simple setting (called the umask). Generally,
the default setting write protects the file from all
except the owner, though all users may have
read access. To see the default permissions of
a file, create a new file and see its permissions.
• By default, For any file, the execute permission
is not given to any type of users (owner, group
or others) To do that, the permissions of the file
need to be changed. This is done with chmod
27. • The chmod command is used to set the
permissions of one or more files for all three
categories of users. It can be run only by the
owner and the super user. The command can
be used in two ways:
• In a relative manner by specifying the changes
to the current permissions
• In an absolute manner by specifying the final
permissions.
28. • Relative permissions- When changing
permissions in relative manner, chmod
changes only the permissions specified in the
command line and leaves the other
permissions unchanged.
chmod category operation permission
filename
• category includes owner, group or others
whose permissions are to be changed
• operation includes assign or remove a
permission
• permission specifies read, write or execute
permission which is to be changed.
29. • Suitable abbreviations are used for each of the
components to frame a compact expression to
be used as an argument to chmod
• Abbreviations used:
Category Operation permission
• u- owner +--Assign permission r- Read
• g- group - ---Remove permission w-Write
• o- others =--Assign absolute x-Execute
• a- all(ugo) permission
30. • To assign execute permission to the owner, the
command will be
• chmod u+x abc
To enable all catogories to have execute permissions we
can have
chmod ugo+x abc; ls –l abc
or
chmod a+x abc
If we do not specify the category, the permissions are
assigned or removed, as the case may be, to all the
categories
chmod +x abc
This will assign execute permissions to all the users for
the file abc
31. • chmod can accept more than one file name in
the command line
• chmod also accepts multiple expressions
delimited by commas
• chmod a-x,go+r abc
• More than one permission can also be set in
one chmod command
• chmod o+wx abc
32. • Absolute permissions- We can also change the
permissions of a file using a string of three octal
numbers. In this case we are not interested in
knowing the previous permissions of the file
and want to set all nine permission bits
explicitly.
• Each type of permission is assigned a number
as shown:
• Read permission---4
• Write permission----2
• Execute permission---1
33. • For each category we add the numbers that
represent the assigned permissions. For
instance, 6 represents read and write
permissions and 7 represents all permissions.
Thus if we want to assign all the permissions to
all the category of users, our each octal digit
will be 7 and the command will be
chmod 777 abc
Similarly, 000 indicates no permission to any of
the categories.
34. • Directory permissions- Directories also have their own
permissions and significance of these permissions differ from
those of ordinary files. Read and write permission of an
ordinary file are also influenced by permissions of directory
housing them.
• Read permission for a directory means that the list of filenames
stored in that directory is accessible. If a directory’s read
permission is removed, ls won’t work.
• Write permission of a directory implies that you are permitted to
create or delete files in the directory. Whether you can modify
the contents of the file in the directory lies with the
permissions of the file not of the directory
• Execute permission of a directory implies that you can traverse
it till its last subdirectory.
• By default any new file that we create has one link whereas any
new directory we create has two links. Because that directory
name appears in two directory files. For example, if dir1 is
created inside aa1 directory, one entry for the file exists in aa1
and one entry exists in dir1 itself as current directory (.) .
35. • umask: Default file and directory permissions
• When you create a file or directory , the permissions
assigned to it depend on the system’s default setting.
The linux has the following default setting
• rw-rw-rw- (666) for ordinary files
• rwxrwxrwx (777) for directories
• However these permissions are not visible. This is
because this default is transformed by subtracting the
user mask from it to remove one or more permissions.
To see the current value of umask, we can use
• umask
022
this shows an octal number which has to be subtracted
from system default to obtain the actual default. Thus
666 becomes 644 for ordinary file and 755 for
directories.
36. • umask is shell built-in command though it also
exists as an external command. A user can
also use it to set a new default.
umask 000
37. • Changing File ownership- chown command can
be used to change the owner of a file. By
default, the person who creates a file is the
default owner of a file. This can be changed as
chown options owner [:group] file(s)
chown sharma :dba dept
changes ownership to sharma and group to dba
changing ownership requires super user
permissions. The status is changed from user
to super user using su command
su
Password: ……….
38. • Changing group ownership- We can change
the group ownership using chgrp command. By
default, a group owner of a file is the one to
which the owner belongs. A user can change
the group owner but only to a group to which
he(owner) also belongs
chgrp dba dept
• The groups and their ids can be seen in file
/etc/group
root:x:0:users
Group
name Group
Password
Group ID
users
39. • Almost every UNIX system, including Linux, provides
a facility known as manual pages. These manual
pages contain online documentation for system
commands, resources, configuration files and so on.
• The command used to access manual pages is man.
If you're interested in learning about other options of
the ls command, you can type
man ls
and the manual page for ls will be displayed.
• Unfortunately, most manual pages are written for
those who already have some idea of what the
command or resource does. For this reason, manual
pages usually contain only the technical details of the
command, without much explanation. However,
manual pages can be an invaluable resource for
jogging your memory if you forget the syntax of a
command.
40. • Wildcards.
• A key feature of most Linux shells is the ability to refer to more than
one file by name using special characters. These wildcards let you refer to,
say, all file names that contain the character `` n''.
• The wildcard ``*'' specifies any character or string of characters in a file
name. When you use the character ``*'' in a file name, the shell replaces it
with all possible substitutions from file names in the directory you're
referencing.
• Here's a quick example. Suppose that Larry has the files frog, joe, and stuff
in his current directory.
• ls
• frog joe stff
• To specify all files containing the letter ``o'' in the filename, use the
command
• ls *o*
• frog joe
• As you can see, each instance of ``*'' is replaced with all substitutions that
match the wildcard from filenames in the current directory. The use of ``*'' by
itself simply matches all filenames, because all characters match the
wildcard.
41. •
The process of changing a ``*'' into a series of filenames is called
wildcard expansion and is done by the shell. This is important: an
individual command, such as ls, never sees the ``*'' in its list of
parameters. The shell expands the wildcard to include all filenames
that match. So, the command
ls *o*
is expanded by the shell to
ls frog joe
One important note about the ``*'' wildcard: it does not match file
names that begin with a single period (``.''). These files are treated as
hidden files--while they are not really hidden, they don't show up on
normal ls listings and aren't touched by the use of the ``*'' wildcard.
• We mentioned earlier that each directory contains two special entries:
``.'' refers to the current directory, and ``..'' refers to the parent
directory. However, when you use ls, these two entries don't show up.
If you use the -a switch with ls, however, you can display filenames
that begin with ``.''. The listing contains the two special entries, ``.''
and `` ..'', as well as two other ``hidden'' files--.bash_profile and
.bashrc. These two files are startup files used by bash when user logs
in.
42. • Note that when you use the ``*'' wildcard, none of the
filenames beginning with ``.'' are displayed.This is a safety
feature: if the ``*'' wildcard matched filenames beginning
with ``.'', it would also match the directory names ``.'' and
``..''. This can be dangerous when using certain commands.
• Another wildcard is ``?''. The ``?'' wildcard expands to
only a single character. Thus, ``ls ?'' displays all one-
character filenames. And ``ls termca?'' would display
``termcap'' but not ``termcap.backup''. As you can see,
wildcards lets you specify many files at one time.
• Examples
• ls j?e
• joe
• ls f??g
• frog frig
43. • Utility Commands-Linux supports various utility commands. Some of these
commands are:
• passwd- This command is used to change the login password.
• tty- this is called teletype command. This tells the filename of the terminal
• uname- Displays the name of the Operating system
uname –r -----displays the version of Operating system
uname –s----- displays the implementation name of Operating System
uname –n---- displays the machine name
• cal command- This is used to display the calendar of the month and year.
cal <monthnumber> <year>
• date command- This command displays the date with time
date--------Date and month with time is displayed
date +%m-------month number is displayed
date +%h------month name is displayed
date +%d------ Date is displayed
• echo- Used to display message
• who- used to find the persons logon to the system
who
• Username device name date time of login machine name
44. who –Hu------- This option prints the column headers and u provides additional
information
• wc command- This command is used to count lines, words and characters in a file. It
comes with the option –l, -w and –c which allow the user to count number of lines,
words and characters.
• who am i- the present settings of the terminal are displayed
• ps- In linux, every process that runs is assigned a unique process id . To know which
processes are running on your terminal, ps command is used.
• ps
• Options that can be used with ps are:
• -a option is used to see the processes of other users
• -u is used for seeing the processes of a particular user
• -f option is used to display additional information for the process
• -e option is used for seeing various other processes of the system
45. • Creating links of a file- The links to a file are established using
ln command
ln filename linkname
Created link does not occupy any new entry on hard disk but
point to the same file with a new name. Making of links to a file
avoid accidental deletion of the file. If the file with a link is
deleted, the link remains.
• More:Paging output
linux offers more pager that displays one page of the output at
a time.
ls –l | more
46. • Disk related commands- One of the major concerns
for the system administrator of a linux installation is
efficient hard disk management. Since the linux file
system is installed usually on a hard disk its
upkeeping is of primary importance
• Checking free disk space
• df command- This command reports used and free
memory on disk. The various fields that are displayed
are:
• File system name
• Number of blocks
• Used
• Available
• Used%
• Mounted on
47. • Other options used for the command are:
• -i – to display the number of inodes used and
free on the file system .df counts the blocks in
sizes of 512 bytes irrespective of actual block
size
• - T- to display the type of file system
48. • Disk usage- The du command
du reports the disk space used by directories. It
reports in terms of number of blocks occupied.
du reports details for the current directory. This
can be changed by specifying the directory
name with du
du /dev
To view only directories and not the
subdirectories, we can use
du –s /dev
49. • The ulimit command- This command is used to
avoid creation of very large sized files on a file
system that can damage a file system. It stands
for user limit and contains a value that signifies
the largest file that can be created by the user
ulimit
The limit is shown in terms of bytes. If a file
greater than this limit is created, it will be
curtailed
The limit can also be reduced by using
ulimit 1
This reduces the size to 1 block i.e 512 bytes or
1024 bytes. This change will be effective only
for the current session.
50. • sort- This command is used to sort the contents of the file.
Apart from sorting the contents, it is also used for merging two
sorted files into a third file. The sorting is done on the basis of
first character of each line. If first characters are same, second
characters are matched and so on
• sort file1 file2 file3----Sorts the contents of three files
• instead of displaying output on the screen we can store it in a
file by saying
• sort –o result file1 file2 file3
• This will sort the three files and put the contents in file result
• To avoid repeated lines in the output
• sort –u –o result file1 file2 file3
• If files are already sorted and we only have to merge them, use
–m option sort –m file1 file2
Sometimes we want to combine the contents of a file with the
input from the keyboard and then carry out the sorting
51. • We can even sort only the input from standard input
by just saying
• sort
• Sort command is also used for sorting their database
files which have its information organised in the form
of fields. For this we use sort keys. The syntax for sort
command is
• sort –r +pos1 –pos2
• Where pos1 and pos2 are the filed numbers from
where to start the sort and till which filed number
• If –pos2 is not given, key is assumed to extend till the
end of the line.
• -r indicates the sorting will be in reverser order
• To sort on a numeric field, we use the option -n
52. • cut- Like sort, cut is also a filter. It cuts or picks up a given
number of character or fields from the specified file. Say you
have a large database of employee’s information. If from this
you want to view only a few selected fields, cut is the answer.
• cut –f 2,7 filename
• this command will display the fields 2 and 7
• To cut 2 through 7
• cut –f 2-7 filename
• cut assumes that fields in the file are separated by tab , if
some other delimiter is used, we have to use –d”<delimiter
character>” with cut command as
• cut –f 2,7 –d”:” filename
• cut command can also be used to specify the number of
columns that can be cut from an input
• cut –c1-2 filename
• This will display only first two columns of each line in display
53. • Searching command-
• grep- grep is an acronym for globally search a
regular expression and print it”. The command
searches the specified input fully for a match
with the supplied pattern and displays it. While
forming the patterns to be searched, we can
use wild cards.
• grep picture newsfile
• This would search the word picture in the file
newsfile and if found the lines containing it
would be displayed on the screen
• grep picture newsfile storyfile
search in multiple files
54. • For search comprising of more than a single
word, single quotes can be used to enclose the
same
grep ‘the picture taken’ –i –n newsfile storyfile
Ignore case
Number of lines
in which pattern
was found
Single quotes for
pattern more than
one word
55. • grep realises that you may not always wish to see
what you search. Rather you want to see the lines not
containing a particular pattern. This can be done with
–v option
grep –v a* filename
this will display all the lines that do not contain a word
that start from a. Also, the lines that contain a
character ‘a’ are also matched as ‘*’ also denote zero
characters
Regular expressions wild characters used are
.-------matches on single character
*------matches repeated characters
$----- match on the end of line
[]---------matches on a class of characters
^----- match on the beginning of line
56. • Examples
• ^consists---- matches for all lines that begin
with consists
• such$-------matches lines that end with such
• B.d -----will match all the lines that contain one
character between B and d
57. • grep options
• option Meaning
• -c returns only number of matches
• -i Ignores the case while searching
• -l returns only filenames
containing a match
• -n returns line number of the matched
text as well as the text itself
• -s Suppresses error messages
• -v Return the lines that do not
contain the match
58. • Viewing files- There are two commands used
for viewing the particular portions of a file.
These are head and tail commands
• head command is used to display particular
number of lines of a file.
head -15 myfile
displays the 15 lines of the file from the
beginning
tail -15 myfile
displays the last fifteen lines of a file.
59. • I/O Redirection and Piping- In all operating
systems, there is a standard input device and a
standard output device. Sometimes it is useful
to redirect the input or output to a file or a
printer. The symbol > implies redirection of
output and the symbol < implies redirection of
input. The symbol > sends the output of a
command to a file or device such as printer.
The symbol < takes input needed for a
command from a file rather than from the
keyboard. The symbol >> adds output from the
command to the end of file without deleting the
information already in the file.
60. example cat file1 >file2
This command tries to display the output of file1
on screen but the output is redirected to the file
file2
Similarly, we can use a file as input also
cat < filename
this will display the contents of the file
We can also use both input and output
redirecting operators in a single command
cat <file1 > file2
This command takes file1 as an input and put
the contents in the file file2
61. • Piping- This command is used to connect one
command to another. It can be really useful to
redirect the output of one program so that it
becomes the input of another program.
cmd1 | cmd2
The output of one command becomes the input
for another command.
• Filters- Filters are the commands that take
input from standard input and display output on
standard output.
62. • tee command- Linux has a command to send the
output to the command to a file as well as to the
display.
who|tee logfile|sort
tee command sends the output of who to the logfile as
well as to the sort command
• tee command can also be used to send output to a
file and to the screen. This is done using the
command
who| tee file1 /dev/pts/12
It is also possible to send the errors to a file
cat file2 > newfile 2> errorfile
63. • Exercises
• Count the number of directories and files in the
current directory
• Sort the names of the users who are currently
logged and store the names in a file
• Store the calendar of current year in the file and
display the file
• Output of who should be displayed on the
screen with the value of total number of users
who have logged on displayed in the last
• Output of ls should be displayed on the screen
and from this output the lines containing the
word ‘poem’ should be counted and count
should be stored in a file file1
64. • List all the files beginning with the character ‘P’
on screen and also store them in a file called
file1
• All files present in the directory dir1 should be
deleted. Any error, if it occurs while carrying out
this operation should be stored in a file errorlog
65. • ls –l |cut –c 1|grep d| wc –l -----Number of
directories can be seen
• who | sort | cut –c 1-7 >file5
• cal 2009 | tee file1
• who|tee file1|wc –l >>file1; cat file1
• ls | tee file2 /dev/pts/12| grep file1 | wc –l >
file10
66.
67.
68. • The Vi editor- vim and gvim
• The vim editor included with most of the linux
distributions is an enhanced version of the vi editor of
unix. It includes all the features of vi editor.
• Vim and emac use a keyboard for two different
operations; to specify editing commands and to
receive character input Used for editing commands,
certain keys perform deletions, some execute changes
and others perform cursor movement.
• Usually these two functions are divided among
different keys on the keyboard
• Alphabetic keys are reserved for character input
• Function keys and control keys specify editing
commands such as deleting text or moving the cursor.
69. • The vi or vim editor operates in three modes
– Command mode
– Input or append mode
– Execution or ex mode
• In command mode , all the keys on the keyboard
become editing commands; in the input mode keys on
the keyboard become input characters.
• Some of the editing commands such as a or i enter
the input mode. On pressing i key, you leave the
command mode and enter the input mode. Pressing
ESC key returns the user to the command mode.
• With vim, you can use ctrl+O command to jump
quickly to the command mode and enter a command.
• Although the vi command mode handles most editing
operations, it cannot perform some, such a file saving
and global substitutions. For such operations, you
need to enter the line editing mode which can be done
by pressing a colon. This is the ex mode
70. • vim <filename>
• After executing the vim command, you enter Vi’s
command mode. Each key becomes a vi editing
command , and the screen becomes a window into the
text file. Text is displayed screen by screen
• After entering the text, you can leave the input mode
and return to command mode. For saving the file,
• Press :ZZ and enter--- will save the file and exit
• To save file while editing, press :w and press enter
• To quit the editing session, you can use :q. it does not
perform any saving. However if you have done some
changes to the file before exiting, you will not be
allowed to exit. To override this use, :q!
• To obtain online help, enter :help
•
71. • gvim- This is another editor provided which has
additional menu buttons on the top which can
be activated by mouse clicks. Other facilities
like cut, copy, paste etc are also provided.
72. h Left one character
l Right one character
k Up one line
j Down one line
w Forward one word
W Forward one space- delimited word
b Back one word
B Back one space- delimited word
e End of the next word
E End of next space- delimited word
0 Beginning of line
$ End of the line
Enter Beginning of the next line
- Beginning of the previous line
( Beginning of sentence
) End of sentence
{ Beginning of para
} End of para
Ctrl+F Moves forward by a screen of text
Ctrl+B Moves Back by a screen of text
73. • Commands for positioning the cursor in window
h Moves the cursor one character to
the left
Backspace Moves the cursor one character to
the left
l Moves the cursor one character to
the right
spacebar Moves the cursor one character to
the right
0 Moves the cursor to the beginning of
the current line
$ Moves the cursor to the end of the
current line
74. • Positioning by line
j Moves the cursor down by one line
in the same column
k Moves the cursor up by one line in
the same column
+ Moves the cursor down to the
beginning of the next line
- Moves the cursor upto the beginning
of the previous line
enter Moves the cursor down to the
beginning of the next line
75. • Positioning by word
w Moves the cursor to the right, to the
first character of the next word.
b Moves the cursor back to the the
first character of the previous word.
e Moves the cursor to the end of the
current word
76. • Positioning in the window
H Moves the cursor to the first line on the
screen, or home
M Moves the cursor to the middle line on
screen
L Moves the cursor to the last line on
screen
77. • Positioning in a file
Ctrl+f Scrolls the screen forward a full window,
revealing the window of text below the
current window
Ctrl+b Scrolls the back a full window, revealing
the window of text above the current
window
78. • Commands for inserting text
a Enter text input mode and appends the text after the
cursor
i Enter text input mode and inserts text text at the cursor
A Enters text input mode and appends text at the end of
current line
o Enter text input mode by opening a new line immediately
below the current line
R Enters the text input mode and overwrites from the
current cursor position onwards
O Enter text input mode by opening a new line immediately
above the current line
I Enters the text input mode and inserts text at the
beginning of current line
79. • Commands for deleting text (work in command mode)
x Deletes the character at the current cursor position
X Deletes the character to the left of the current cursor
position
dw Deletes the word from the cursor to the next space or to
the next punctuation
dd Deletes the current line
nx, ndw, ndd Deletes n characters, n words or n lines
d0 Deletes the current line from the cursor to the beginning
of the line
d$ Deletes the current line from cursor to the end of the line
80. • Miscellaneous Commands
. Repeats the action performed by the last command
u Undoes the effect of last command
U Restores all changes to the current line since you
moved the cursor to this line
J Joins the line immediately below the current linewith the
current line
~ Changes the character at the current cursor position
from upper to lower case and vice versa
:sh Temporarily returns to the shell to perform some shell
commands. Type exit to return to vi
Ctrl + l Clears and redraws the current window
81. • Commands for quitting vi
ZZ Write the buffer to the file and quits vi
:wq Write the buffer to the file and quits vi
:w filename
and :q
Write the buffer to the file filename and quits vi
:w! filename
and :q
Overwrites the existing file filename with the contents of
the buffer and quits vi
:q! Quits vi whether or not changes made to the buffer were
written to a file
:q Quits vi if changes made to the buffer were written to a
file
82. • Block commands- these are the commands that apply
to a block of text. For all the block commands,
following things hold:
• All the block commands work in ex command mode
• Line numbers should be associated with the text
before we issue any block commands. This is so
because block commands need to be told the line
numbers on which they are supposed to operate.
Inorder to make the line numbers displayed along
with the lines, we have to set number in ex mode
:set number
Use of : makes it a line editing command which is
issued at the bottom of the screen. The lines of the file
are numbered from 1 onwards
83. • Various block commands are
:nd Deletes nth line
:m,n d Deletes m to n lines where m and n are line numbers
:n mo p Moves line n after line p
:m,n mo p Moves lines m to n after line p
:m co p Copies line m after line p
:m,n co p Copies lines m to n after line p
:m,n w filename Writes lines m to n to a file
:m,n w >>
filename
Appends lines m to n to a file
: r filename Reads the contents of the file filename at current cursor
position
:r !comamnd Executes the shell command and output of the command is
read at the current cursor position
84. Command Function
/pattern Searches forward in the buffer for the next
occurrence of the pattern of text. Positions
the character under the first character of the
pattern
?pattern Searches backwards in the buffer for the first
occurrence of the patterns of text.
n Repeats the last search command
N Repeats the search command in the
opposite direction
85. • While searching a pattern you may want to
search all occurrences of the word irrespective
of its case. In such a case, we can set to
ignore the case
• :set ignorecase or :set ic
• Find and replace- We can also replace the
found pattern with a new one in vi editor
86. Command Function
:s/str1/str2 Replaces the first occurrence of str1 with
str2 in current line
:
s/str1/str2/g
Replaces all occurrences of str1 with str2 in
current line
:m,n
s/str1/str2/g
Replaces all occurrences of str1 with str2
from lines m to n
:1,$
s/str1/str2/g
Replaces all occurrences of str1 with str2
from lines 1 to last
:1,.
s/str1/str2/g
Replaces all occurrences of str1 with str2
from first line to current
:.,$
s/str1/str2/g
Replaces all occurrences of str1 with str2
from current to last
87. Command Function
:set nu Set display of line numbers on
:set nonum Set display of line numbers off
:set eb Beep the speaker when an error occurs
:set noeb Do not beep the speaker
:set ai Set autoindent on
: set noai Set auto indent off
: set ic Set ignorecase on
: set noic No ignore case
To get a list of all set options use
:set all
88. • Multiple file editing in vi
• Vi permits editing of multiple files at one go.
• vi filename1 filename2 filename3….
• The first file given as argument is opened for
editing
• At any moment , to find out the number of files
loaded for editing
• : args
• This displays the list of files with the name of
the file being currently edited enclosed within
the square brackets []
89. • After editing the current file, we can shift to next
file by typing:
• :n
• The shift to next file is only allowed if the
current file is not edited . If the current file is
edited, we have to use
• :n!
• Unlike n, there is no command available for
editing the previous file. However we can go to
the first file for editing using’
• :rew
• or :rew!
90. • If a new file is to be opened for editing instantly
• :e filename
• This filename will not be added to the previous
list of filenames.
• :f
• Displays the name of the current file
91. • Command line options in vi
Command Function
vi +100 file Loads file and places cursor on the 100th
line in the file
vi +/pattern file Loads file and places cursor on the first
occurrence of the matching pattern
view file Displays file in the read only mode of vi.
Any changes made to the buffer will not
be allowed to be written to the file
92. • Shell Script- A shell script or a shell program is a
series of commands given to the interpreter at one
time. Instead of specifying one job at a time, we give
the shell a to-do list –a program that carries out an
entire procedure. Such programs are known as shell
scripts.
• The script can be written using any of the editors of
linux. The script files are not executable and has to be
made executable using chmod command.
• When we execute a command at the dollar prompt,
they are executed in the shell that was invoked when
we logged in. As against this, when we execute a shell
script, the login shell creates a new shell,a new
command interpreter and waits idly in the background
while the new shell executes our shell script.
93. • Inorder to run a shell script,
• Type the script in vi editor
• After saving the text,
• sh <filename>
• Inorder to run the file with its name only, we
have to change the permissions of file to get
executable permission. This is done using
• chmod u+x filename
• After getting executing permissions, we can run
it as
• ./filename
94. • Interactive shell script- Two basic words in shell
vocabulary read and echo are used for making
interactive shell scripts.
• echo is to display a message
• read is used for taking input from the user