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 document describes the functions of various Linux commands, including commands for listing files (ls), creating directories (mkdir) and files (touch, cat), copying files (cp), changing directories (cd), moving files (mv), finding file locations (whereis, which), displaying manual pages (man, info), checking disk usage (df, du), viewing running processes (ps), setting aliases (alias), changing user identity (su, sudo), viewing command history (history), setting the system date and time (date), displaying calendars (cal), and clearing the terminal screen (clear). It provides the syntax and examples for using each command.
The document discusses the history and advantages of Linux compared to other operating systems like Windows, DOS and UNIX. It explains how the GNU project was started to develop a free and open source UNIX-like operating system. It then describes how Linus Torvalds developed the initial Linux kernel in 1991 building on the work of the GNU project. It highlights some key advantages of Linux like high security, many available tools and the flexibility of the environment. It also provides a brief overview of some common Linux components like the kernel, shells, KDE/GNOME desktop environments and the directory structure.
DevOps is an increasingly useful tool for achieving business objectives, enabling your teams to work together to improve the efficiency and quality of software delivery. However, despite its growing popularity, there is still a lack of clarity over what DevOps actually means, how organizations should do it and what's the best way to get started.
DevOps 101 takes a brief look at the history of DevOps, why it started, what problems it is intended to solve and how you can start implementing it.
The slides were delivered by James Betteley, Head of Education at the DevOpsGuys in a one-hour webinar. The full recording is available here - https://youtu.be/4gC3WpbetKs?t=2s
James has spent the last few years neck-deep in the world of DevOps transformation, helping a wide range of organizations optimize the way they collaborate to deliver better software, faster. James was joined by Elizabeth Ayer, Portfolio Manager, from Redgate Software. Elizabeth looks after a range of Redgate products that help teams extend their DevOps practices to SQL Server databases.
For more information visit www.devopsguys.com and www.red-gate.com
The document discusses Linux file systems. It describes that Linux uses a hierarchical tree structure with everything treated as a file. It explains the basic components of a file system including the boot block, super block, inode list, and block list. It then covers different types of file systems for Linux like ext2, ext3, ext4, FAT32, NTFS, and network file systems like NFS and SMB. It also discusses absolute vs relative paths and mounting and unmounting filesystems using the mount and umount commands.
Here are the key differences between relative and absolute paths in Linux:
- Relative paths specify a location relative to the current working directory, while absolute paths specify a location from the root directory.
- Relative paths start from the current directory, denoted by a period (.). Absolute paths always start from the root directory, denoted by a forward slash (/).
- Relative paths are dependent on the current working directory and may change if the working directory changes. Absolute paths will always refer to the same location regardless of current working directory.
- Examples:
- Relative: ./file.txt (current directory)
- Absolute: /home/user/file.txt (from root directory)
So in summary, relative paths
This document provides an overview of DevOps, including definitions, principles, challenges, and how DevOps addresses issues with traditional development models. Some key points covered include:
- DevOps aims to unify development and operations teams to accelerate delivery through a collaborative culture, automation, measurement, and sharing.
- Traditional models caused bottlenecks due to lack of alignment between teams. DevOps breaks down silos and improves coordination.
- DevOps follows a continuous development lifecycle using practices like continuous integration, delivery, and deployment.
- Automation, infrastructure as code, containers, and cloud platforms help optimize the development and deployment process in DevOps.
This presentation introduces clustering analysis and the k-means clustering technique. It defines clustering as an unsupervised method to segment data into groups with similar traits. The presentation outlines different clustering types (hard vs soft), techniques (partitioning, hierarchical, etc.), and describes the k-means algorithm in detail through multiple steps. It discusses requirements for clustering, provides examples of applications, and reviews advantages and disadvantages of k-means clustering.
Molecular markers can be used to characterize plant genetic resources and assist in pre-breeding for climate change. Various marker techniques are described, including hybridization-based RFLP and PCR-based RAPD, ISSR, SSR, AFLP, EST, and SCoT. Molecular markers reflect heritable DNA differences and have advantages like being ubiquitous, stable, and not affecting phenotypes. Data from markers can be analyzed to construct genetic similarity matrices and dendrograms to study genetic diversity and relationships. Molecular markers have applications in fingerprinting, diversity studies, marker-assisted selection, genetic mapping, and gene tagging.
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.
Getting started with setting up embedded platform requires audience to understand some of the key aspects of Linux. This presentation deals with basics of Linux as an OS, Linux commands, vi editor, Shell features like redirection, pipes and shell scripting
- 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.
This document summarizes the history and key aspects of Linux. It describes how Linux originated from earlier operating systems like MULTICS and UNIX. It provides an overview of Linux components like the kernel, GNU tools, and popular desktop interfaces. It also summarizes common Linux commands for file navigation, editing, and process management. Finally, it gives a brief introduction to the GNOME desktop environment.
This document provides an overview of a presentation on Linux programming and administration. It covers the history of Unix and Linux, files and directories in Linux, Linux installation, basic Linux commands, user and group administration, and LILO (Linux Loader). The document introduces key topics like Unix flavors, Linux distributions, partitioning and formatting disks for Linux installation, the file system hierarchy standard, and access permissions in Linux.
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.
In many ways, directories are treated like files. They can be created, deleted, moved and copied from Nautilus or from a shell prompt, using commands similar to those for files.
Creating Directories
You must have write permissions in a directory in order to create a new sub-directory. Most users have these permissions in their home directory (and its sub-directories) and the /tmp/ directory.
To create a new directory with Nautilus, navigate to the location of your new directory. Right-click in a blank portion of the window and select Create Folder. A new folder icon appears with the highlighted text untitled folder. Type a name for your folder and press [Enter].
To create a new directory using a shell prompt, use the command mkdir. Enter: mkdir <directory-name>, replacing <directory-name> with the intended title of the new directory.
Deleting Directories
To delete a directory from Nautilus, right click on it and choose Move to Trash, or click and drag the icon to the Trash on the Desktop.
To delete an empty directory from a shell prompt, enter the command rmdir. To delete a directory that may not be empty (and consequently everything inside that directory), enter the command rm -rf <directory>. Refer to Section 4.5.5 Delete files with rm for more information regarding the rm command.
Dot Directories
Applications create "dot" directories as well as dot files. Dot files are a single hidden configuration file — a dot directory is a hidden directory of configuration and other files required by the application. The non-configuration files in these directories are generally user-specific, and will be available only to the user who installed them.
This document provides an overview of shell scripting in 3 paragraphs or less:
The document discusses Linux shell scripting, including that a shell is a user program that provides an environment for user interaction by reading commands from standard input and executing them. It mentions common shell types like BASH, CSH, and KSH, and that shell scripts allow storing sequences of commands in a file to execute them instead of entering each command individually. The document provides basic information on writing, executing, and using variables and input/output redirection in shell scripts.
The document summarizes the standard directory structure and purposes of the main directories in a Linux file system. The root directory (/) contains all other directories and files on the system. Key directories include /bin for essential executable binaries, /dev for device files, /etc for system configuration files, /home for user files, /lib for shared libraries, /sbin for system administration binaries, /tmp for temporary files, /usr for user programs and documentation, and /var for files that change frequently like logs.
The document provides an overview of common Linux commands, including commands for executing other commands, navigating directories, listing and copying files, managing users and permissions, searching for files, processing text, managing archives, and compressing files. Examples are given for commands like ls, cd, cp, mv, rm, who, echo, alias, awk, chown, diff, grep, pushd, kill, df, cat, tar, gzip, su. Brief descriptions are provided for most commands and references are given at the end for additional Linux resources.
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
Most file systems have methods to assign permissions or access rights to specific users and groups of users.
These system control the ability of the users to view, change, navigate, and execute the contents of the file system.
Permissions on the linux- systems are managed in three distinct scopes or classes. Theses scopes are known as users, groups or others.
Users and groups are used on GNU/Linux for access control that is, to control access to the system's files, directories, and peripherals. Linux offers relatively simple/coarse access control mechanisms by default.
Présentation aux Geeks Anonymes Liège par Cyril Soldani, le 13 décembre 2017.
Page des Geeks Anonymes : https://www.recherche.uliege.be/cms/c_9463913/fr/geeks-anonymes
Linux is an open-source operating system based on Unix, designed for multi-user environments. The document provides an overview of basic Linux commands like ls, mkdir, cd for navigating files and directories, as well as more advanced commands for manipulating files, checking system resources, and getting system information. It also lists and describes many common Linux commands and their functions.
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 shells and shell scripting in Linux. It provides information on common Linux shells like Bash, Bourne shell, C shell, etc. It describes the basic functions of shells like command interpretation, I/O redirection, variables, parameters and more. Shell scripts allow automating tasks and complex series of commands. The document also covers shell script basics, special parameters, variables, I/O redirection operators and more shell scripting concepts.
The document provides information about shells in Linux operating systems. It defines what a kernel and shell are, explains why shells are used, describes different types of shells, and provides examples of shell scripting. The key points are:
- The kernel manages system resources and acts as an intermediary between hardware and software. A shell is a program that takes commands and runs them, providing an interface between the user and operating system.
- Shells are useful for automating tasks, combining commands to create new ones, and adding functionality to the operating system. Common shells include Bash, Bourne, C, Korn, and Tcsh.
- Shell scripts allow storing commands in files to automate tasks.
This document provides a summary of the Unix and GNU/Linux command line. It begins with an overview of files and file systems in Unix, including that everything is treated as a file. It then discusses command line interpreters (shells), and commands for handling files and directories like ls, cd, cp, and rm. It also covers redirecting standard input/output, pipes, and controlling processes. The document is intended as training material and provides a detailed outline of its contents.
This document provides commands for basic file management and system utilities in Linux/Unix systems. It includes commands for listing, moving, copying, deleting and changing permissions of files and directories. It also includes commands for editing files, finding files, archiving files, printing files, managing processes, debugging programs, I/O redirection and setting environment variables.
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.
Getting started with setting up embedded platform requires audience to understand some of the key aspects of Linux. This presentation deals with basics of Linux as an OS, Linux commands, vi editor, Shell features like redirection, pipes and shell scripting
- 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.
This document summarizes the history and key aspects of Linux. It describes how Linux originated from earlier operating systems like MULTICS and UNIX. It provides an overview of Linux components like the kernel, GNU tools, and popular desktop interfaces. It also summarizes common Linux commands for file navigation, editing, and process management. Finally, it gives a brief introduction to the GNOME desktop environment.
This document provides an overview of a presentation on Linux programming and administration. It covers the history of Unix and Linux, files and directories in Linux, Linux installation, basic Linux commands, user and group administration, and LILO (Linux Loader). The document introduces key topics like Unix flavors, Linux distributions, partitioning and formatting disks for Linux installation, the file system hierarchy standard, and access permissions in Linux.
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.
In many ways, directories are treated like files. They can be created, deleted, moved and copied from Nautilus or from a shell prompt, using commands similar to those for files.
Creating Directories
You must have write permissions in a directory in order to create a new sub-directory. Most users have these permissions in their home directory (and its sub-directories) and the /tmp/ directory.
To create a new directory with Nautilus, navigate to the location of your new directory. Right-click in a blank portion of the window and select Create Folder. A new folder icon appears with the highlighted text untitled folder. Type a name for your folder and press [Enter].
To create a new directory using a shell prompt, use the command mkdir. Enter: mkdir <directory-name>, replacing <directory-name> with the intended title of the new directory.
Deleting Directories
To delete a directory from Nautilus, right click on it and choose Move to Trash, or click and drag the icon to the Trash on the Desktop.
To delete an empty directory from a shell prompt, enter the command rmdir. To delete a directory that may not be empty (and consequently everything inside that directory), enter the command rm -rf <directory>. Refer to Section 4.5.5 Delete files with rm for more information regarding the rm command.
Dot Directories
Applications create "dot" directories as well as dot files. Dot files are a single hidden configuration file — a dot directory is a hidden directory of configuration and other files required by the application. The non-configuration files in these directories are generally user-specific, and will be available only to the user who installed them.
This document provides an overview of shell scripting in 3 paragraphs or less:
The document discusses Linux shell scripting, including that a shell is a user program that provides an environment for user interaction by reading commands from standard input and executing them. It mentions common shell types like BASH, CSH, and KSH, and that shell scripts allow storing sequences of commands in a file to execute them instead of entering each command individually. The document provides basic information on writing, executing, and using variables and input/output redirection in shell scripts.
The document summarizes the standard directory structure and purposes of the main directories in a Linux file system. The root directory (/) contains all other directories and files on the system. Key directories include /bin for essential executable binaries, /dev for device files, /etc for system configuration files, /home for user files, /lib for shared libraries, /sbin for system administration binaries, /tmp for temporary files, /usr for user programs and documentation, and /var for files that change frequently like logs.
The document provides an overview of common Linux commands, including commands for executing other commands, navigating directories, listing and copying files, managing users and permissions, searching for files, processing text, managing archives, and compressing files. Examples are given for commands like ls, cd, cp, mv, rm, who, echo, alias, awk, chown, diff, grep, pushd, kill, df, cat, tar, gzip, su. Brief descriptions are provided for most commands and references are given at the end for additional Linux resources.
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
Most file systems have methods to assign permissions or access rights to specific users and groups of users.
These system control the ability of the users to view, change, navigate, and execute the contents of the file system.
Permissions on the linux- systems are managed in three distinct scopes or classes. Theses scopes are known as users, groups or others.
Users and groups are used on GNU/Linux for access control that is, to control access to the system's files, directories, and peripherals. Linux offers relatively simple/coarse access control mechanisms by default.
Présentation aux Geeks Anonymes Liège par Cyril Soldani, le 13 décembre 2017.
Page des Geeks Anonymes : https://www.recherche.uliege.be/cms/c_9463913/fr/geeks-anonymes
Linux is an open-source operating system based on Unix, designed for multi-user environments. The document provides an overview of basic Linux commands like ls, mkdir, cd for navigating files and directories, as well as more advanced commands for manipulating files, checking system resources, and getting system information. It also lists and describes many common Linux commands and their functions.
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 shells and shell scripting in Linux. It provides information on common Linux shells like Bash, Bourne shell, C shell, etc. It describes the basic functions of shells like command interpretation, I/O redirection, variables, parameters and more. Shell scripts allow automating tasks and complex series of commands. The document also covers shell script basics, special parameters, variables, I/O redirection operators and more shell scripting concepts.
The document provides information about shells in Linux operating systems. It defines what a kernel and shell are, explains why shells are used, describes different types of shells, and provides examples of shell scripting. The key points are:
- The kernel manages system resources and acts as an intermediary between hardware and software. A shell is a program that takes commands and runs them, providing an interface between the user and operating system.
- Shells are useful for automating tasks, combining commands to create new ones, and adding functionality to the operating system. Common shells include Bash, Bourne, C, Korn, and Tcsh.
- Shell scripts allow storing commands in files to automate tasks.
This document provides a summary of the Unix and GNU/Linux command line. It begins with an overview of files and file systems in Unix, including that everything is treated as a file. It then discusses command line interpreters (shells), and commands for handling files and directories like ls, cd, cp, and rm. It also covers redirecting standard input/output, pipes, and controlling processes. The document is intended as training material and provides a detailed outline of its contents.
This document provides commands for basic file management and system utilities in Linux/Unix systems. It includes commands for listing, moving, copying, deleting and changing permissions of files and directories. It also includes commands for editing files, finding files, archiving files, printing files, managing processes, debugging programs, I/O redirection and setting environment variables.
This document provides an overview of 27 basic Linux commands, including ls to list files, rm to remove files, rmdir to remove empty directories, cat to display file contents, cd to change directories, mv to move/rename files, who to display logged in users, mkdir to create directories, cp to copy files, and man to view command manuals. It also covers commands for permissions (chmod), clearing the screen (clear), viewing users (w), remote login (telnet), creating files (touch), editing files (vi), displaying date and time (date), viewing calendar (cal), showing IP address (ifconfig), and hostname.
x:501:100:John Doe:/home/assistant:/bin/ksh
The fields in the /etc/passwd file are:
1. Login name
2. Encrypted password
3. User ID number
4. Group ID number
5. User name or comment field
6. Home directory path
7. Login shell program
So in summary, the /etc/passwd file defines the user accounts and basic attributes.
The /etc/shadow file stores the encrypted passwords separately for security.
The /etc/group file defines the system groups and group membership information.
These three files together define the user accounts and authentication information on the system.
مقدمة وتمهيد - Charisma Code كاريزما كود Ahmad Salameh
لبناء كوادر الأعمال والمجتمع المدني
ينفرد الكاتب بإضافة التسلية في التعلم وبتعزيز تطبيقات أفكاره بأفلام سينمائية عالمية
أسرار لا تعلمها المناهج ولا الكليات ولم يعبر عنها الآباء والمدراء
The document provides an overview of basic and useful UNIX commands organized into categories including essential commands, valuable commands, fun commands, helpful commands, and useful commands. It describes commands for navigating directories, manipulating files, editing text, sending email, connecting to other systems, monitoring system usage, and more. The document is intended to help users get started with common tasks in UNIX.
The Linux file system structure contains a root directory (/) that contains subdirectories for essential system files and programs. Some key subdirectories are /bin and /sbin for essential binaries, /etc for configuration files, /dev for device files, /proc for process information, /var for variable and log files, /tmp for temporary files, /usr for user-installed programs, /home for user home directories, /boot for boot loader files, and /lib for library files supporting binaries. Additional subdirectories include /opt for optional software, /mnt and /media for temporarily mounting file systems, and /srv for server-specific files.
here you will get basic idea about TERMINAL. you learn some basic commands. with the help of that commands you can make new folder(directory), new file with .txt or any other extension.you will learn HOW to make multiple folder in just one second. you will find Important information about the Linux terminal.
The document outlines a technical seminar on Linux administration presented by Yogesh K S. It discusses key topics like installing Linux, user and group management, security features like firewalls and SELinux, managing services, backups, and package management. The seminar covered essential admin tasks, tools, and commands for system installation, configuration, maintenance and security.
The document discusses key concepts related to process management in Linux, including process lifecycle, states, memory segments, scheduling, and priorities. It explains that a process goes through creation, execution, termination, and removal phases repeatedly. Process states include running, stopped, interruptible, uninterruptible, and zombie. Process memory is made up of text, data, BSS, heap, and stack segments. Linux uses a O(1) CPU scheduling algorithm that scales well with process and processor counts.
Unix is a multi-user, multi-tasking operating system that was first created in 1969 at Bell Labs. It allows many users to use the system simultaneously running multiple programs. Linux originated in 1991 as a personal project and is now a free, open source Unix-like operating system. It features multi-tasking, virtual memory, networking and more. Linux is widely used for servers, workstations, internet services and more due to its low cost, stability, and reliability compared to other operating systems.
The document discusses Linux file systems. It begins with an overview of file system architecture, including inodes, dentries, superblocks, and how data is never erased but overwritten. It then covers various local file systems like Ext2, Ext3, Ext4, ReiserFS, and XFS. Next it discusses log-structured and pseudo file systems. It also covers network file systems like NFS and CIFS. Finally it summarizes cluster, distributed, and Hadoop file systems. The document provides a technical overview of Linux file system types, structures, features and capabilities.
The document discusses Linux commands for file management, viewing and shell programming. It describes common commands like ls, cd, cp, mv, rm, mkdir which allow navigating and manipulating files and directories. It also covers commands for viewing file contents like cat, head, tail, grep. Commands for compression like tar, gzip, zip and decompression like gunzip, unzip are mentioned. The document also has a section on shell programming which explains how to write shell scripts using commands and variables. It provides examples of using pipes, redirections and command options.
Linux System Administration Crash CourseJason Cannon
This document provides an overview of a Linux administration crash course that covers key system administration concepts. The course is intended for anyone interested in learning Linux administration, from beginners to experienced professionals. It covers topics such as the Linux boot process, system logging, disk management, user and group management, networking, processes and jobs, scheduling jobs with cron, and managing software. The document promotes enrolling in an in-depth Linux administration course for live instruction and assistance with shell scripting.
So you think the systems at your employer can actually use a little bit more security? Or what about your own system to gain more privacy? In this talk, we discuss the reasons for Linux server and system hardening. First we learn why we should protect our crown jewels, and what can wrong if we ignore information security. Next is getting a better understanding of the possible resources we can use. And since system hardening can be time-consuming, we discuss some tools to help in the system hardening quest.
Linux is considered to be a secure operating system by default. Still there is a lot to learn about system hardening and technical auditing. This 1-hour presentation explains the need for hardening and auditing of your systems. We discussed some additional documents and tools, to further help this endeavor.
This presentation is suitable for both beginners and those with experience in system hardening.
The document provides an overview of common Linux commands organized into categories, with brief explanations of each command. It covers commands for working with files and directories (ls, cd, cp, rm), processes (ps, top, kill), networking (ping, ifconfig), file archiving and compression (tar, gzip), and more. It also lists important directories in the Linux file system such as /bin, /usr/bin, /etc, and directories under /usr.
This document discusses processes in Linux. It defines a process as a running instance of a program in memory that is allocated space for variables and instructions. All processes are descended from the systemd process. It describes process states like running, sleeping, stopped, and zombie. It also discusses process monitoring and management tools like top, ps, kill, and setting process priorities with nice and renice. Examples are provided on using ps to view specific processes by user, name, ID, parent ID, and customize the output.
The document summarizes the contents of a training on the Unix and GNU/Linux command line. It covers shells and command line interpreters, the filesystem structure, file handling commands like ls, cd, cp, and file permissions. It also discusses standard input/output redirection, pipes, process control and environment variables. The training contents are organized into 5 sections covering these topics at an introductory level.
The document summarizes the contents of a training presentation on the Unix and GNU/Linux command line. It covers shells and command line interpreters, the filesystem structure including common directories, file handling commands like ls, cd, cp, and an introduction to pipes and I/O redirection. Special files and directories like symlinks, devices, and ~ (home directory) are explained. File permissions and ownership are also mentioned.
This document discusses embedded Linux programming. It covers topics such as what Linux is, the layers in a Linux system including the kernel and user programs, how Linux differs from legacy real-time operating systems, and an agenda for a course on embedded Linux driver development that covers the Linux kernel, memory management, interrupts, and networking. It also provides information on basic Linux command line tools and file permissions.
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.
The document provides information about an upcoming UNIX and Shell Scripting workshop, including contact information for the workshop instructor R. Chockalingam, and covers topics that will be discussed such as the architecture and components of the UNIX operating system, basic UNIX commands, text editors, the file system structure, flags and arguments, and more.
The document provides an overview of the contents of a training on the Unix and GNU/Linux command line. It covers topics such as shells and filesystem structure, file handling commands, standard input/output redirection, task control, text editing and system administration basics. The training aims to teach users full control of tasks and how to get help and find resources on the command line.
Unix is a multi-user networked operating system that handles files, runs programs, and handles input/output. It is designed for server use and networking is intrinsic. Each user has their own settings and permissions, and multiple users can be logged in simultaneously. The document then provides information about accessing Unix servers from Windows and using basic commands like ls, cd, mkdir and rm to navigate directories and manage files.
This document provides an introduction to Linux, including:
- What Linux is and where it came from, as an open source operating system created by Linus Torvalds in 1991.
- How to get Linux through downloading a distribution like Red Hat and the packages it includes.
- Why Linux has become significant due to its growing popularity, ability to run on multiple hardware platforms, and being free.
- An overview of Linux commands and utilities for file management, processes, users and permissions.
This document provides an overview of system administrator tasks and basic UNIX concepts. It discusses the roles and responsibilities of system administrators, the structure and components of UNIX operating systems, basic commands for navigating the file system, managing files and directories, editing text, and running processes. It also covers shells, variables, and cron jobs for scheduling automated tasks. The document concludes with introductions to AIX operating systems and IBM pSeries servers.
This document provides instructions for 27 common Linux commands: mkdir, rmdir, ls, cd, cat, touch, wc, who, pwd, rm, mv, chmod, cp, grep, cal, date, vi, tput, ps, export, type, tail, sudo, head, man, clear, and adduser. For each command, it lists the syntax and provides 1-3 examples of common uses. The document is presented over 28 pages with the commands organized topic-by-topic and includes formatting like headings and indentation to aid readability.
The document discusses Linux commands for file management and viewing. It describes commands for navigating directories (cd), changing file permissions (chmod), copying files (cp), finding files (find), listing directory contents (ls), creating and removing directories (mkdir, rmdir), moving and renaming files (mv), viewing file contents (cat, head, tail), comparing files (cmp, diff), searching files (grep), and more. It also covers commands for compressing, archiving, and backing up files like tar, gzip, zip, and commands for counting, sorting, and filtering file contents.
This document provides an overview of basic Unix commands including ls, cd, pwd, mkdir, rm, rmdir, cp, find, touch, echo, cat, who, and du. It explains what each command is used for and provides examples of common usages. The document serves as a beginner's guide to learning Unix commands.
File is a container for storing information. It can be treated as a sequence of characters. Unlike the old DOS files, a UNIX file doesn‟t contain eof (end- of –file) mark. A file‟s size is not stored in the file, nor even its name. All files attributes are kept in separate area of hard disk, not accessible to humans, but only to the kernel.ThesisScientist.com
Linux is an open source operating system created by Linus Torvalds in 1991. It uses a Linux kernel and includes many common Unix tools. Linux is free to use and modify due to its open source licensing. It runs on many hardware platforms and is growing in popularity for servers, desktops, and embedded systems due to its low cost, stability, and security. Users can download Linux from distributions like Red Hat which package the Linux kernel with additional software and support.
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 describes an SMS based irrigation system that allows controlling irrigation remotely via SMS. The system uses a microcontroller, GSM module, sensors, and other components. It allows turning the irrigation on and off remotely by SMS, monitors soil moisture and temperature, and sends notifications on irrigation status. The microcontroller is programmed using Embedded C on the Keil IDE to control the system components and SMS communication.
This document describes an automatic irrigation system that uses a microcontroller to monitor soil moisture levels and control a motor and sprinklers. The system includes a water sensor to check if the soil needs water, and will turn on the motor and sprinklers if the soil is dry. It will turn the motor off once the sensor detects adequate moisture again. The microcontroller acts as the central control unit, receiving input from the sensor and controlling the motor and other components through relays. The system is programmed using embedded C on the Keil IDE compiler.
Implementation of solar illumination system with three-stage charging and dim...Wave Digitech
This document describes the implementation of a solar illumination system with three-stage charging and dimming control. The system uses solar energy to charge a battery. A buck-boost converter regulates the voltage to continuously charge the battery. Another buck-boost converter supplies constant voltage from the battery to power LEDs for lighting and maintain consistent brightness even as the battery drains. A microcontroller monitors voltages and controls relays to switch between charging and lighting modes depending on available solar power.
Zl embd045 wireless telemedia system based on arm and web serverWave Digitech
This document describes a wireless telemedicine system that measures a patient's temperature and heartbeat using sensors. The system has two modules: a transmitter section placed with the patient that senses their vital signs and sends the data via ZigBee; and a receiver section in the doctor's office that receives the patient data and displays it on a PC for the doctor to monitor remotely. The system aims to make vital sign monitoring more affordable and accessible for patients compared to visiting hospitals or labs.
Zl embd029 arm and rfid based event management monitoring systemWave Digitech
This document describes an ARM and RFID based event monitoring system. The system uses an ARM7 microcontroller to store information like names, identification numbers, and timestamps of visitors entering large events on an RFID card. Visitors swipe their RFID cards at entry and the system records their details. In an emergency, the stored information can be retrieved from the computer to help locate or identify people present. The ARM7 microcontroller was chosen for its low power usage, speed, and support for real-time operating systems. RFID readers scan cards and send identification data to the microcontroller via serial communication.
The document provides an overview of ARM basics including:
- The different CPU modes including user, fast interrupt, interrupt, supervisor, abort, undefined, and system modes.
- The banked registers that are used across modes including the program counter, stack pointer, link register, and current program status register.
- How pipelining works to improve processor throughput by dividing instructions into fetch, decode, and execute stages.
- The different types of exceptions including interrupts, undefined instructions, and how the processor switches modes and handles exceptions.
The Intel MCS-51 (commonly referred to as 8051) is a Harvard architecture, CISC instruction set, single chip microcontroller (µC) series which was developed by Intel in 1980 for use in embedded systems.[1] Intel's original versions were popular in the 1980s and early 1990s and enhanced binary compatible derivatives remain popular today.
Specialized in Embedded systems.
Live Projects on Different Domains
Microprocessors and Microcontrollers.
Training on Programming Languages.
Power electronics
Matlab
Projects 2013-14
Difference bw android4.2 to android 4.3Wave Digitech
The document discusses the key differences between Android 4.2 and 4.3, including new features like Bluetooth Low Energy support, OpenGL ES 3.0, improved developer tools, and security enhancements. It notes Android 4.3 moves to SELinux MAC in the Linux kernel for added security. Contact information is provided for Wavedigitech, the apparent creators of the document.
Unix Process Management
Process management is an integral part of any modern day operating system (OS). The OS must allocate resources to processes, enable processes to share and exchange information, protect the resources of each process from other processes and enable synchronisation among processes
U-Boot is an open source boot loader that initializes hardware and loads operating systems. It supports many CPUs and boards. The boot process involves a pre-relocation phase where U-Boot initializes hardware and copies itself to RAM, and a post-relocation phase where it finishes hardware initialization and loads the kernel or operating system. Debugging can be done before and after relocation by setting breakpoints and examining memory.
Android Debug Bridge (adb):- ADB is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device.
Useful Linux and Unix commands handbookWave Digitech
This article provides practical examples for most frequently used commands in Linux / UNIX. Helpful for Engineers and trainee engineers, Software developers. A handy notes for all Linux & Unix commands.
Training in Programming Languages
Programming Languages ( C, C++, JAVA)
Linux/Unix
Microcontrollers and Processors
RTOS ( Vxworks, QNX )
Android
Embedded Systems
Linux Internals and Device Drivers
Networking/Wireless
SDLC
About Us We provide quality solution for embedded system and deliver the best, Thereby helping clients to “Do Business Better”. Wavedigitech is leading in providing Software Services and research. We follow stringent information security and quality standards. Our expertise and experience enable businesses to reduce costs and increase process efficiency.
This document discusses embedded systems and provides examples of where embedded systems are used. It defines embedded systems as electronic systems that contain software and hardware to control data processing, storage and access. Embedded systems have a brain or microcontroller and are found in devices like air conditioners, ATMs, mobile phones, cars and medical equipment. The document also outlines the history of embedded systems and discusses areas like embedded operating systems, microcontrollers, development tools and Android application development.
The document discusses the GNU Debugger (GDB) and how to use it. GDB allows debugging programs by setting breakpoints, examining variables, and stepping through code. It supports remote debugging of embedded systems. Key GDB commands include break, run, print, step, and next. Compiling with -g enables debugging. GDB can examine local variables, arguments, registers, and struct pointer fields.
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfSoftware Company
Explore the benefits and features of advanced logistics management software for businesses in Riyadh. This guide delves into the latest technologies, from real-time tracking and route optimization to warehouse management and inventory control, helping businesses streamline their logistics operations and reduce costs. Learn how implementing the right software solution can enhance efficiency, improve customer satisfaction, and provide a competitive edge in the growing logistics sector of Riyadh.
How Can I use the AI Hype in my Business Context?Daniel Lehner
𝙄𝙨 𝘼𝙄 𝙟𝙪𝙨𝙩 𝙝𝙮𝙥𝙚? 𝙊𝙧 𝙞𝙨 𝙞𝙩 𝙩𝙝𝙚 𝙜𝙖𝙢𝙚 𝙘𝙝𝙖𝙣𝙜𝙚𝙧 𝙮𝙤𝙪𝙧 𝙗𝙪𝙨𝙞𝙣𝙚𝙨𝙨 𝙣𝙚𝙚𝙙𝙨?
Everyone’s talking about AI but is anyone really using it to create real value?
Most companies want to leverage AI. Few know 𝗵𝗼𝘄.
✅ What exactly should you ask to find real AI opportunities?
✅ Which AI techniques actually fit your business?
✅ Is your data even ready for AI?
If you’re not sure, you’re not alone. This is a condensed version of the slides I presented at a Linkedin webinar for Tecnovy on 28.04.2025.
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfAbi john
Analyze the growth of meme coins from mere online jokes to potential assets in the digital economy. Explore the community, culture, and utility as they elevate themselves to a new era in cryptocurrency.
AI and Data Privacy in 2025: Global TrendsInData Labs
In this infographic, we explore how businesses can implement effective governance frameworks to address AI data privacy. Understanding it is crucial for developing effective strategies that ensure compliance, safeguard customer trust, and leverage AI responsibly. Equip yourself with insights that can drive informed decision-making and position your organization for success in the future of data privacy.
This infographic contains:
-AI and data privacy: Key findings
-Statistics on AI data privacy in the today’s world
-Tips on how to overcome data privacy challenges
-Benefits of AI data security investments.
Keep up-to-date on how AI is reshaping privacy standards and what this entails for both individuals and organizations.
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Impelsys Inc.
Impelsys provided a robust testing solution, leveraging a risk-based and requirement-mapped approach to validate ICU Connect and CritiXpert. A well-defined test suite was developed to assess data communication, clinical data collection, transformation, and visualization across integrated devices.
Big Data Analytics Quick Research Guide by Arthur MorganArthur Morgan
This is a Quick Research Guide (QRG).
QRGs include the following:
- A brief, high-level overview of the QRG topic.
- A milestone timeline for the QRG topic.
- Links to various free online resource materials to provide a deeper dive into the QRG topic.
- Conclusion and a recommendation for at least two books available in the SJPL system on the QRG topic.
QRGs planned for the series:
- Artificial Intelligence QRG
- Quantum Computing QRG
- Big Data Analytics QRG
- Spacecraft Guidance, Navigation & Control QRG (coming 2026)
- UK Home Computing & The Birth of ARM QRG (coming 2027)
Any questions or comments?
- Please contact Arthur Morgan at [email protected].
100% human made.
HCL Nomad Web – Best Practices and Managing Multiuser Environmentspanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-nomad-web-best-practices-and-managing-multiuser-environments/
HCL Nomad Web is heralded as the next generation of the HCL Notes client, offering numerous advantages such as eliminating the need for packaging, distribution, and installation. Nomad Web client upgrades will be installed “automatically” in the background. This significantly reduces the administrative footprint compared to traditional HCL Notes clients. However, troubleshooting issues in Nomad Web present unique challenges compared to the Notes client.
Join Christoph and Marc as they demonstrate how to simplify the troubleshooting process in HCL Nomad Web, ensuring a smoother and more efficient user experience.
In this webinar, we will explore effective strategies for diagnosing and resolving common problems in HCL Nomad Web, including
- Accessing the console
- Locating and interpreting log files
- Accessing the data folder within the browser’s cache (using OPFS)
- Understand the difference between single- and multi-user scenarios
- Utilizing Client Clocking
Artificial Intelligence is providing benefits in many areas of work within the heritage sector, from image analysis, to ideas generation, and new research tools. However, it is more critical than ever for people, with analogue intelligence, to ensure the integrity and ethical use of AI. Including real people can improve the use of AI by identifying potential biases, cross-checking results, refining workflows, and providing contextual relevance to AI-driven results.
News about the impact of AI often paints a rosy picture. In practice, there are many potential pitfalls. This presentation discusses these issues and looks at the role of analogue intelligence and analogue interfaces in providing the best results to our audiences. How do we deal with factually incorrect results? How do we get content generated that better reflects the diversity of our communities? What roles are there for physical, in-person experiences in the digital world?
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxJustin Reock
Building 10x Organizations with Modern Productivity Metrics
10x developers may be a myth, but 10x organizations are very real, as proven by the influential study performed in the 1980s, ‘The Coding War Games.’
Right now, here in early 2025, we seem to be experiencing YAPP (Yet Another Productivity Philosophy), and that philosophy is converging on developer experience. It seems that with every new method we invent for the delivery of products, whether physical or virtual, we reinvent productivity philosophies to go alongside them.
But which of these approaches actually work? DORA? SPACE? DevEx? What should we invest in and create urgency behind today, so that we don’t find ourselves having the same discussion again in a decade?
Procurement Insights Cost To Value Guide.pptxJon Hansen
Procurement Insights integrated Historic Procurement Industry Archives, serves as a powerful complement — not a competitor — to other procurement industry firms. It fills critical gaps in depth, agility, and contextual insight that most traditional analyst and association models overlook.
Learn more about this value- driven proprietary service offering here.
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersToradex
Toradex brings robust Linux support to SMARC (Smart Mobility Architecture), ensuring high performance and long-term reliability for embedded applications. Here’s how:
• Optimized Torizon OS & Yocto Support – Toradex provides Torizon OS, a Debian-based easy-to-use platform, and Yocto BSPs for customized Linux images on SMARC modules.
• Seamless Integration with i.MX 8M Plus and i.MX 95 – Toradex SMARC solutions leverage NXP’s i.MX 8 M Plus and i.MX 95 SoCs, delivering power efficiency and AI-ready performance.
• Secure and Reliable – With Secure Boot, over-the-air (OTA) updates, and LTS kernel support, Toradex ensures industrial-grade security and longevity.
• Containerized Workflows for AI & IoT – Support for Docker, ROS, and real-time Linux enables scalable AI, ML, and IoT applications.
• Strong Ecosystem & Developer Support – Toradex offers comprehensive documentation, developer tools, and dedicated support, accelerating time-to-market.
With Toradex’s Linux support for SMARC, developers get a scalable, secure, and high-performance solution for industrial, medical, and AI-driven applications.
Do you have a specific project or application in mind where you're considering SMARC? We can help with Free Compatibility Check and help you with quick time-to-market
For more information: https://www.toradex.com/computer-on-modules/smarc-arm-family
Semantic Cultivators : The Critical Future Role to Enable AIartmondano
By 2026, AI agents will consume 10x more enterprise data than humans, but with none of the contextual understanding that prevents catastrophic misinterpretations.
Role of Data Annotation Services in AI-Powered ManufacturingAndrew Leo
From predictive maintenance to robotic automation, AI is driving the future of manufacturing. But without high-quality annotated data, even the smartest models fall short.
Discover how data annotation services are powering accuracy, safety, and efficiency in AI-driven manufacturing systems.
Precision in data labeling = Precision on the production floor.
2. Training contents
Shells, Filesystem and file handling
Everything is a file
GNU / Linux filesystem structure
Command line interpreters
Handling files and directories
Displaying, scanning and sorting files
Symbolic and hard link
File access rights
Standard I/O, redirections, pipes
Standard input/output, redirecting to files.
Pipes: redirecting standard output to other
commands
Standard error
Miscellaneous
Text editors
Compressing and archiving
Printing files
Comparing files and directories
Looking for files
User information.
Task control
Full control on tasks
Executing in background,
suspending, resuming and
aborting
List of active tasks
Killing processes
Environment variables
PATH environment variables
Shell aliases, .bashrc file
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
3. Unix file system
Almost everything in Unix is a file!
Regular files
Directories : Directories are just files
listing a set of files
Symbolic links : Files referring to the
name of another file
Devices and peripherals
Read & write from devices
As with regular files
Pipes Used to cascade programs
(e.x ) cat *.log | grep error
Sockets ( Inter process communication)
File names
File names
• Case sensitive
• No obvious length limit
Can contain any character (including
whitespace, except /).
File types stored in the file (“magic
numbers”).
File name extensions not needed and
not interpreted. Just
used for user convenience.
Examples: README .bashrc
Windows Buglist index.htm
index.html index.html.old
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
4. File paths
A path is a sequence of nested
directories with a file or directory
at the end, separated by the /
character
Relative path:
documents/fun/microsoft.html
Relative to the current directory
Absolute path:
/home/bill/bugs/crash94020311
/ : root directory.
Start of absolute paths for all files
on the system (even for files on
removable devices or network
shared).
/tmp/ Temporary files
/usr/ Regular user tools (not essential to
the system)
e.x /usr/bin/, /usr/lib/, /usr/sbin...
/usr/local/ Specific software installed by
the sysadmin (preferred to /opt/)
/var/ Data used by the system/system
servers
/var/log/, /var/spool/mail (incoming
mail), /var/spool/lpd (print jobs)...
The Unix filesystem structure is defined
by the Filesystem Hierarchy Standard
(FHS):
http://www.pathname.com/fhs/
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
5. GNU / Linux file system structure
Not imposed by the system. Can vary from one system to the other, even between two
GNU/Linux installations!
/ Root directory
/bin/ Basic, essential system commands
/boot/ Kernel images, initrd and configuration files
/dev/ Files representing devices
/dev/hda: First IDE hard disk
/etc/ System configuration files
/home/ User directories
/lib/ Basic system shared libraries
/lost+found Corrupt files the system tried to recover
/media Mount points for removable media: /media/usbdisk, /media/cdrom
/mnt/ Mount points for temporarily mounted filesystems
/opt/ Specific tools installed by the sysadmin
/usr/local/ often used instead
/proc/ Access to system information (/proc/cpuinfo, /proc/version ...
/root/ root user home directory
/sbin/ Administratoronly commands
/sys/ System and device controls (cpu frequency, device power)
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
6. Shells and file handling
Shells: tools to execute user commands
Called “shells” because they hide the
details on the underlying operating
system under the shell's surface.
Commands are input in a text terminal,
either a window in a graphical
environment or a text-only console.
Results displayed on the terminal. No
graphics needed at all.
Shells can be scripted: provide all the
resources to write complex programs
(variable, conditionals, iterations...)
Well known shells
Most famous and popular shells
sh: The Bourne shell (obsolete)
Traditional, basic shell found on Unix
systems, by Steve Bourne.
csh: The C shell (obsolete)
Once popular shell ( Clike syntax )
tcsh: The TC shell (still very popular)
A C shell compatible implementation with
evolved features(command completion,
history editing & more...)
bash: The Bourne Again shell (most
popular) An improved implementation of sh
with lots of added features too.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
7. ls command
Lists the files in the current directory, in alphanumeric order, except files starting
with the ―.‖ character.
ls -a (all)
Lists all the files (including .* files)
ls -l (long)
Long listing (type, date, size, owner,
permissions)
ls -t (time)
Lists the most recent files first
ls –S (size)
Lists the biggest files first
ls –r (reverse)
Reverses the sort order
ls –ltr (options can be combined)
Long listing, most recent files at the end
Better introduced by examples!
ls *txt
The shell first replaces *txt by all the file and
directory names ending by txt (including .txt),
except those starting with ., and then executes
the ls command line.
ls –d .*
Lists all the files and directories starting with
-d tells ls not to display the contents of
directories.
cat ?.log
Displays all the files which names start by 1
character and
end by .log
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
8. Special directories
~/
Not a special directory indeed. Shells just
substitute it by the home directory of the
current user.
Cannot be used in most programs, as it is not
a real directory.
~sydney/
Similarly, substituted by shells by the home
directory of the sydney user.
cd <dir>
Changes the current directory to <dir>.
cd –
Gets back to the previous current directory.
pwd
Displays the current directory ("working
directory").
./
The current directory. Useful for
commands taking a directory argument.
Also sometimes useful to run commands in
the current directory .
So ./readme.txt and readme.txt are
equivalent.
../
The parent (enclosing) directory. Always
belongs to the . directory (see ls a).
Only reference to the parent directory.
Typical usage:
cd ..
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
9. The cp command
cp <source_file> <target_file>
cp file1 file2 file3 ... dir
Copies the files to the target
cp –I (interactive)
Asks for user confirmation if the target file
already exists
cp –r <source_dir> <target_dir>
(recursive)
Copies the whole directory.
mv and rm commands
Creating and removing directories
mv and rm commands
mv <old_name> <new_name> (move)
Renames the given file or directory.
mv –i (interactive)
If the new file already exits, asks for user
confirm
rm file1 file2 file3 ... (remove)
Removes the given files.
rm –i (interactive)
Always ask for user confirm.
rm –r dir1 dir2 dir3 (recursive)
Removes the given directories with all
their contents
mkdir dir1 dir2 dir3 ... (make dir)
Creates directories with the given names.
rmdir dir1 dir2 dir3 ... (remove dir)
Removes the given directories
Safe: only works when directories and
empty.
Alternative: rm –r
(doesn't need empty directories).
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
10. E-mail: [email protected]; http://www.zeelogic.com Phone : 91-80-23376639
Displaying file contents
Displaying the contents of files.
cat file1 file2 file3 ... (concatenate)
Concatenates and outputs the contents of the
given files.
more file1 file2 file3 ...
After each page, asks the user to hit a key to
continue.Can also jump to the first occurrence
of a keyword (/ command).
less file1 file2 file3 ...
Does more than more with less.
Doesn't read the whole file before starting.
Supports backward movement in the file (?
command).
The head and tail commands
head [< n>] <file>
Displays the first <n> lines (or 10 by default)
of the given file. Doesn't have to open the
whole file to do this!
tail [< n>] <file>
Displays the last <n> lines (or 10 by default)
of the given file.No need to load the whole
file in RAM! Very useful for huge files.
tail –f <file> (follow)
Displays the last 10 lines of the given file and
continues to display new
lines when they are appended to the file.
Examples
1) head windows_bugs.txt
2) tail –f outlook_vulnerabilities.txt
11. grep command
grep <pattern> <files>
Scans the given files and displays the
lines which match the given pattern.
grep error *.log
Displays all the lines containing error in
the *.log files
grep –i error *.log
Same, but case insensitive.
grep –ri error .
Same, but recursively in all the files in .
and its subdirectories
grep –v info *.log
Outputs all the lines in the files except
those containing info.
The sort command
sort <file>
Sorts the lines in the given file
in character order and outputs
them.
sort –r <file>
Same, but in reverse order.
sort –ru <file>
u: unique. Same, but just
outputs identical lines once.
More possibilities described
later!
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
12. Symbolic links
A symbolic link is a special file
which is just a reference to the name
of another one (file or directory):
Useful to reduce disk usage and
complexity when 2 files have the
same content.
Example:
anakin_biography > darth_biagraphy
How to identify symbolic links:
ls –l displays -> and the linked file
name.
GNU ls displays links with a
different color.
Creating symbolic links
To create a symbolic link (same order as in cp):
ln –s file_name link_name
To create a link with to a file in another
directory, with the
same name:
ln –s ../README.txt
To create multiple links at once in a given
directory:
ln –s file1 file2 file3 ... dir
To remove a link:
rm link_name
Of course, this doesn't remove the linked file!
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
13. Hard links
The default behavior for ln is to create
hard links
A hard link to a file is a regular file with
exactly the same physical contents
While they still save space, hard links
can't be distinguished from the original
files.
If you remove the original file, there is
no impact on the hard link contents.
The contents are removed when there are
no more files (hard links) to them.
Files names and inodes
Makes hard and symbolic (soft) links
easier to understand!
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
14. Command documentation
Some Unix commands and most GNU /
Linux commands offer at least one help
argument:
-h (- is mostly used to introduce 1
character options)
--help (-- is always used to introduce
the corresponding “long” option name,
which makes scripts easier to
understand).
You also often get a short summary of
options when you input an invalid
argument.
Command help
Manual pages
man <keyword>
Displays one or several manual pages
for <keyword>
man manS
Most available manual pages are about
Unix commands, but some are also
about C functions, headers or data
structures,
or even about system configuration
files!
man stdio.h
man fstab (for /etc/fstab)
Manual page files are looked for in the
directories specified by
the MANPATH environment variable.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
15. Users and permissions
Use ls –l to check file access rights
3 types of access rights
Read access (r)
Write access (w)
Execute rights (x)
3 types of access levels
User (u): for the owner of the file
Group (g): each file also has a “group”
attribute, corresponding to a given list of
users
Others (o): for all other users
Access right constraints
x is sufficient to execute binaries Both x and r and
required for shell scripts. Both r and x permissions
needed in practice for directories:
r to list the contents, x to access the contents.
You can't rename, remove, copy files in a directory if you
don't have w access to this directory.
If you have w access to a directory, you CAN remove a
file even if you don't have write access to this file
(remember that a directory is just a file describing a list
of files). This even lets you modify (remove + recreate) a
file even without w access to it.
Access rights examples
-rw-r—r Readable
and writable for file owner, only readable
for others
-rw-r------ Readable
and writable for file owner, only readable
for users belonging to the file group.
Drwx------ Directory
only accessible by its owner
-------r-x
File executable by others but neither by
your friends nor by
yourself. Nice protections for a trap...
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
16. chmod: changing permissions
chmod <permissions> <files>
2 formats for permissions:
Octal format (abc):
a,b,c = r*4+w*2+x (r, w, x: booleans)
Example: chmod 644 <file>
(rw for u, r for g and o)
Or symbolic format. Easy to understand by
examples:
chmod go+r: add read permissions to group
and others.
chmod u-w: remove write permissions from
user.
chmod a-x: (a: all) remove execute
permission from all.
chmod R a+rX linux/
Makes linux and everything in it available to
everyone!
R: apply changes recursively
X: x, but only for directories and files already
executable
Very useful to open recursive access to
directories, without adding execution rights to
all files.
chmod a+t /tmp
t: (sticky). Special permission for directories,
allowing only the directory and file owner to
delete a file in a directory.
Useful for directories with write access to
anyone, like /tmp.
Displayed by ls –l with a t character.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
17. File ownership
Particularly useful in (embedded) system
development when you create files for another
system.
chown –R sco /home/linux/src
(R: recursive)
Makes user sco the new owner of all the files
in /home/linux/src.
chgrp –R empire /home/skywalker
Makes empire the new group of everything in
/home/skywalker.
chown R borg:aliens usss_entreprise/
chown can be used to change the owner and
group at the same time.
Beware of the dark side of root
root user privileges are only needed for
very specific tasks with security risks:
mounting, creating device files, loading
drivers, starting networking, changing
file ownership, package upgrades...
Even if you have the root password,
your regular account should be
sufficient for 99.9 % of your tasks
(unless you are a system administrator).
In a training session, it is acceptable to
use root. In real life, you may not even
have access to this account, or put your
systems and data at risk if you do.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
18. Using the root account
In case you really want to use root...
If you have the root password:
su - ( Switch User )
in modern distributions, the sudo command gives you
access to some root privileges with your own user
password.
Example: sudo mount /dev/hda4 /home
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
19. Standard I/O, redirections, pipes
More about command output
All the commands outputting text on your terminal do it by writing
to their standard output.
Standard output can be written (redirected) to a file using the > symbol
Standard output can be appended to an existing file using the >> symbol
Standard output redirection examples
ls ~adam/* > ~gwb/debug.txt
cat obiwan_kenobi.txt > starwars_biographies.txt
cat han_solo.txt >> starwars_biographies.txt
echo “README: No such file or directory” > README
Useful way of creating a file without a text editor.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
20. Standard input
More about command input
Lots of commands, when not given input arguments, can
take their input from standard input.
sort
windows
linux
[Ctrl][D]
linux
Windows
sort < participants.txt
The standard input of sort is taken from the given file.
sort takes its input from
the standard input: in this case,
what you type in the terminal
(ended by [Ctrl][D])
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
21. Pipes
Unix pipes are very useful to redirect the standard output
of a command to the standard input of another one.
Examples:- cat *.log | grep -i error | sort
grep –ri error . | grep -v “ignored” | sort –u >
serious_errors.log
cat /home/*/homework.txt | grep mark | more
This one of the most powerful features in Unix shells!
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
22. The tee command
tee [-a] file
The tee command can be used to send standard output to the
screen and to a file simultaneously.
make | tee build.log
Runs the make command and stores its output to build.log.
make install | tee –a build.log
Runs the make install command and appends its output to
build.log.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
23. Standard error
Error messages are usually output (if the program is well
written) to standard error instead of standard output.
Standard error can be redirected through 2> or 2>>
Example:
cat f1 f2 nofile > newfile 2> errfile
Note: 1 is the descriptor for standard output, so 1> is equivalent to
>.
Can redirect both standard output and standard error to the
same file using &> :
cat f1 f2 nofile &> wholefile
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
24. The yes command
Useful to fill standard input with always the same
string.
yes <string> | <command>
Keeps filling the standard input of <command> with
<string> (y by default).
Examples
yes | rm –r dir/
bank> yes no | credit_applicant
yes "" | make oldconfig
(equivalent to hitting [Enter] to accept all default
settings)
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
25. Special devices
Device files with a special behavior or
contents
/dev/null :- The data sink! Discards all data
written to this file. Useful to get rid of
unwanted output, typically log information:
mplayer black_adder_4th.avi &> /dev/null
/dev/zero
Reads from this file always return 0
characters
Useful to create a file filled with zeros:
dd if=/dev/zero of=disk.img bs=1k
count=2048
/dev/random
Returns random bytes when read. Mainly
used by cryptographic programs. Uses
interrupts from some device drivers as
sources of true randomness (“entropy”).
Reads can be blocked until enough entropy is
gathered.
/dev/urandom
For programs for which pseudo random
numbers are fine. Always generates random
bytes, even if not enough entropy is available
(in which case it is possible, though still
difficult, to predict future byte sequences
from past ones).
See man random for details.
/dev/full
Mimics a full device.
Useful to check that your application
properly handles this kind of situation.
See man full for details.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
27. Full control on tasks
Unix supports true preemptive
multitasking.
Ability to run many tasks in parallel, and
abort them even if they corrupt their own
state and data.
Ability to choose which programs you
run.
Ability to choose which input your
programs takes, and where their output
goes.
Processes
“Everything in Unix is a file Everything
in Unix that is not a file is a process”
Processes : Instances of a running
programs
Several instances of the same program
can run at the same time Data
associated to processes: ( Open files,
allocated memory, stack, process id,
parent, priority, state... )
Running jobs in background
Same usage throughout all the shells Useful
For command line jobs which output can be examined later, especially for time
consuming ones.
To start graphical applications from the command line and then continue with the
mouse.
Starting a task: add & at the end of your line:
find_prince_charming –cute --clever –rich &
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
28. Background job control
jobs
Returns the list of background jobs from the
same shell
[1] Running
~/bin/find_meaning_of_life withoutgod
&
[2]+ Running make mistakes &
fg
fg %<n>
Puts the last / nth background job in foreground
mode
Moving the current task in background mode:
[Ctrl] Z
bg
kill %<n>
Aborts the nth job.
Job control example
> jobs
[1]Running
~/bin/find_meaning_of_life withoutgod
&
[2]+ Running make mistakes &
> fg
make mistakes
> [Ctrl] Z
[2]+ Stopped make mistakes
> bg
[2]+ make mistakes &
> kill %1
[1]+ Terminated
~/bin/find_meaning_of_life withoutgod
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
29. Listing all processes
... whatever shell, script or process they are started from
ps –ux ( Lists all the processes belonging to the current user)
ps –aux (Note: ps edf on System V systems)
Lists all the processes running on the system
ps -aux | grep bart | grep bash
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME
COMMAND
bart 3039 0.0 0.2 5916 1380 pts/2 S 14:35 0:00 /bin/bash
bart 3134 0.0 0.2 5388 1380 pts/3 S 14:36 0:00 /bin/bash
bart 3190 0.0 0.2 6368 1360 pts/4 S 14:37 0:00 /bin/bash
bart 3416 0.0 0.0 0 0 pts/2 RW 15:07 0:00 [bash]
PID: Process id
VSZ: Virtual process size (code + data + stack)
RSS: Process resident size: number of KB currently in RAM
TTY: Terminal
STAT: Status: R (Runnable), S (Sleep), W (paging), Z (Zombie)...
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
30. Live process activity
top Displays most important processes, sorted by cpu percentage
top 15: 44:33 up 1:11, 5 users, load average: 0.98, 0.61, 0.59
Tasks: 81 total, 5 running, 76 sleeping, 0 stopped, 0 zombie
Cpu(s): 92.7% us, 5.3% sy, 0.0% ni, 0.0% id, 1.7% wa, 0.3% hi, 0.0% si
Mem: 515344k total, 512384k used, 2960k free, 20464k buffers
Swap: 1044184k total, 0k used, 1044184k free, 277660k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+
COMMAND
3809 jdoe 25 0 6256 3932 1312 R 93.8 0.8 0:21.49 bunzip2
2769 root 16 0 157m 80m 90m R 2.7 16.0 5:21.01 X
3006 jdoe 15 0 30928 15m 27m S 0.3 3.0 0:22.40 kdeinit
3008 jdoe 16 0 5624 892 4468 S 0.3 0.2 0:06.59 autorun
3034 jdoe 15 0 26764 12m 24m S 0.3 2.5 0:12.68 kscd
3810 jdoe 16 0 2892 916 1620 R 0.3 0.2 0:00.06 top
You can change the sorting order by typing
M: Memory usage, P: %CPU, T: Time.
You can kill a task by typing k and the process id.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
31. Killing processes
kill <pids> Sends an abort signal to the given processes. Lets processes save data and exit
by themselves. Should be usedfirst.
Example: kill 3039 3134 3190 3416
kill -9 <pids>
Sends an immediate termination signal. The system itself terminates the processes. Useful
when a process is really stuck (doesn't answer to kill 1).
kill -9 -1 Kills all the processes of the current user. 1:means all processes.
killall [-< signal>] <command>
Kills all the jobs running <command>. Example:
killall bash
xkill
Lets you kill a graphical application by clicking on it! Very quick! Convenient when you
don't know the application command name.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
32. Environment variables
Shells let the user define variables. They can be reused in shell commands.
Convention: lower case names
You can also define environment variables: variables that are also visible within
scripts or executable called from the shell.
Convention: upper case names.
env Lists all defined environment variables and their value.
Shell variables (bash)
projdir=/home/marshall/coolstuff
ls -la
$projdir; cd $projdir
Environment variables (bash)
cd $HOME
export DEBUG=1
./find_extraterrestrial_life
(displays debug information if DEBUG is set)
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
33. Main standard environment variables
Used by lots of applications!
LD_LIBRARY_PATH Shared library search path
DISPLAY Screen id to display X (graphical) applications on.
EDITOR Default editor (vi, emacs...)
HOME Current user home directory
HOSTNAME Name of the local machine
MANPATH Manual page search path
PATH Command search path
PRINTER Default printer name
SHELL Current shell name
TERM Current terminal type
USER Current user name
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
34. PATH environment variables
PATH
Specifies the shell search order for commands
/
home/acox/bin:/usr/local/bin:/usr/kerberos/bi
n:
/usr/bin:/bin:/usr/X11R6/bin:/bin:/usr/bin
LD_LIBRARY_PATH
Specifies the shared library (binary code
libraries shared by
applications, like the C library) search order
for ld
/usr/local/lib:/usr/lib:/lib:/usr/X11R6/lib
MANPATH
Specifies the search order for manual pages
/usr/local/man:/usr/share/man
It is strongly recommended not to have the
“.” directory in your PATH environment
variable, in particular not at the beginning:
A cracker could place a malicious ls file
in your directories. It would get
executed when you run ls in this
directory and could do naughty things to
your data.
If you have an executable file called test
in a directory, this will override the
default test program and some scripts
will stop working properly.
Each time you cd to a new directory, the
shell will waste time updating its list of
available commands.
Call your local commands as follows: ./test
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
35. Alias Command
Shells let you define command aliases: shortcuts for
commands you
use very frequently.
Examples
alias ls='ls la'
Useful to always run commands with default arguments.
alias rm='rm i'
Useful to make rm always ask for confirmation.
alias frd='find_ram_device asap --risky'
Useful to replace very long and frequent commands.
alias cia='. /home/sydney/env/cia.sh'
Useful to set an environment in a quick way
(. is a shell command to execute the content of a shell script).
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
36. The which command
Before you run a command, which tells you where it is found
bash> which ls
alias ls='ls --color= tty'
/bin/ls
tcsh> which ls
ls: aliased to ls --color=tty
bash> which alias
/usr/bin/which: no alias in
(/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin)
tcsh> which alias
alias: shell builtin command.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
37. ~/.bashrc file
~/.bashrc
Shell script read each time a bash shell is started
You can use this file to define
Your default environment variables (PATH, EDITOR...).
Your aliases.
Your prompt (see the bash manual for details).
A greeting message.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
38. Command history
history :- Displays the latest commands that you ran and their number. You
can copy and paste command strings.
You can recall the latest command:
!!
You can recall a command by its number
!1003
You can recall the latest command matching a starting string:
!cat
You can make substitutions on the latest command:
^more^less
You can run another command with the same arguments:
more !*
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
39. Text editors
Graphical text editors
Fine for most needs
nedit
Emacs, Xemacs
Kate, Gedit
Textonly text editors
Often needed for sysadmins and
great for power users
vi, vim
nano
The nedit text editor
http://www.nedit.org/
Best text editor for non vi or emacs
experts
Feature highlights:
Very easy text selection and
moving
Syntax highlighting for most
languages and formats. Can be
tailored for your own log files, to
highlight particular errors and
warnings.
Easy to customize through
menus
Not installed by default by all
distributions
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
40. Kate and gedit
Kate is a powerful text
editor
dedicated to programming
activities, for KDE
http://kate.kde.org
Gedit is a text editor for the
Gnome environment
http://projects.gnome.org/ge
dit/
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
41. Vi Editor
Textmode text editor available in all Unix systems. Created before computers with
mice appeared.
Difficult to learn for beginners used to graphical text editors.
Very productive for power users.
Often can't be replaced to edit files in system administration or in Embedded
Systems, when you just have a text console.
vim vi improved
vi implementation now found in most GNU /
Linux host systems
Implements lots of features available in
modern editors: syntax highlighting,
command history, help, unlimited undo and
much much more.
Cool feature example: can directly open
compressed text files.
Comes with a GTK graphical interface
(gvim)
Unfortunately, not free software (because of
a small restriction in freedom to make
changes)
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
42. Measuring disk usage
Caution: different from file size!
du -h <file> (disk usage)
-h: returns size on disk of the given file, in human
readable format: K (kilobytes), M (megabytes) or G
(gigabytes), .
Without -h, du returns the raw number of
disk blocks used by the file (hard to read).
Note that the -h option only exists in GNU du.
du -sh <dir>
-s: returns the sum of disk usage of all the files in the
given directory.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
43. Measuring disk space
df -h <dir>
Returns disk usage and free space for the filesystem
containing the given directory.
Similarly, the –h option only exists in GNU df.
Example:
df -h .
Filesystem Size Used Avail Use% Mounted on
/dev/hda5 9.2G 7.1G 1.8G 81% /
df -h
Returns disk space information for all filesystems available in
the system. When errors happen, useful to look for full
filesystems.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
44. Compressing and decompressing
Very useful for shrinking huge files and saving space
g[un]zip <file>
GNU zip compression utility. Creates .gz files. Ordinary
performance (similar to Zip).
b[un]zip2 <file>
More recent and effective compression utility. Creates .bz2 files.
Usually 2025% better than gzip.
[un]lzma <file>
Much better compression ratio than bzip2 (up to 10 to 20%).
Compatible command line options.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
45. Archiving
Useful to backup or release a set of files
within 1 file
tar: originally ―tape archive‖
Creating an archive:
tar cvf <archive> <files or directories>
c: create
v: verbose. Useful to follow archiving
progress.
f: file. Archive created in file (tape used
otherwise).
Example:
tar cvf /backup/home.tar /home
bzip2 /backup/home.tar
Viewing the contents of an archive or
integrity check:
tar tvf <archive>
t: test
Extracting all the files from an
archive:
tar xvf <archive>
Extracting just a few files from an
archive:
tar xvf <archive> <files or
directories>
Files or directories are given with paths
relative to the archive root directory.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
46. Extra options in GNU tar
tar = gtar = GNU tar on GNU / Linux
Can compress and uncompress archives on the fly. Useful
to avoid creating huge intermediate files Much simpler to
do than with tar and bzip2!
j option: [un]compresses on the fly with bzip2
z option: [un]compresses on the fly with gzip
--lzma option: [un]compresses on the fly with lzma
Examples (which one will you remember?)
gtar jcvf bills_bugs.tar.bz2 bills_bugs
tar cvf bills_bugs | bzip2 > bills_bugs.tar.bz2
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
47. Unix printing
Multiuser, multijob, multiclient, multiprinter
In Unix / Linux, printing commands don't really print.
They send jobs to printing queues, possibly on the
local machine, on network printing servers or on
network printers.
Printer independent system:
Print servers only accept jobs in PostScript
or text. Printer drivers on the server take
care of the conversion to each printers own format.
Robust system:
Reboot a system, it will continue to print
pending jobs.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
48. Useful environment variable: PRINTER Sets the default printer on the system.
Example:
export PRINTER=lp
lpr [P<queue>] <files>
Sends the given files to the specified printing queue The files must be in text or
PostScript format. Otherwise, you only print garbage.
a2ps [P<queue>] <files>
“Any to PostScript” converts many formats to PostScript and send the output to the
specified queue. Useful features:
several pages / sheet, page numbering, info frame...
Printing commands
Print job control
lpq [P<queue>] Lists all the print jobs in the given or default queue.
lp is not ready
Rank Owner Job File(s) Total Size
1st asloane 84 nsa_windows_backdoors.ps 60416 bytes
2nd amoore 85 gw_bush_iraq_mistakes.ps 65024000 bytes
cancel <job#> [<queue>] Removes the given job number from the default queue.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
49. Comparing files and directories
diff file1 file2
Reports the differences between 2 files, or nothing if the
files are identical.
diff –r dir1/ dir2/
Reports all the differences between files with the same
name in the 2 directories.
These differences can be saved in a file using the redirection,
and then later reapplied using the patch command.
To investigate differences in detail, better use graphical tools!
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
51. kompare
Another nice tool to compare files and merge differences
Part of the kdesdk package (Fedora Core)
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
52. gvimdiff
Another nice tool
to view
differences in
files Available in
most
distributions
with gvim
Apparently not
using
diff.
No issue with
files with binary
sections!
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
53. The find command
find . Name ―*.pdf‖
Lists all the *.pdf files in the current (.) directory or
subdirectories. You need the double quotes to prevent the shell
from expanding the * character.
find docs name "*.pdf" exec xpdf {} ';‗
Finds all the *.pdf files in the docs directory and displays one
after the other.
Many more possibilities available! However, the above 2
examples cover most needs.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
54. The locate command
Much faster regular expression search alternative to find locate
keys
Lists all the files on your system with keys in their name.
locate ―*.pdf‖
Lists all the *.pdf files available on the whole machine
locate ―/home/fridge/*coke*‖
Lists all the *coke* files in the given directory (absolute path)
locate is much faster because it indexes all files in a
dedicated database, which is updated on a regular basis.
find is better to search through recently created files.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
55. Changing users
You do not have to log out to log on another user account!
su hyde
(Rare) Change to the hyde account, but keeping the environment
variable settings of the original user.
su jekyll
(More frequent) Log on the jekyll account, with exactly the
same settings as this new user.
su - When no argument is given, it means the root user.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
56. The wget command
Instead of downloading files from your browser, just copy and paste their URL and
download them with wget!
wget main features
http and ftp support
Can resume interrupted downloads
Can download entire sites or at least check for bad links
Very useful in scripts or when no graphics are available (system administration,
embedded systems)
Proxy support (http_proxy and ftp_proxy env. variables)
wget –c http://microsoft.com/customers/dogs/winxp4dogs.zip
Continues an interrupted download.
wget –m http://lwn.net/
Mirrors a site.
wget -r –np http://www.xml.com/ldd/chapter/book/
Recursively downloads an online book for offline access.
-np: "noparent". Only follows links in the current directory.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
57. Misc commands
sleep 60
Waits for 60 seconds (doesn't consume system
resources).
wc report.txt (word count)
438 2115 18302 report.txt
Counts the number of lines, words and characters in
a file or in standard input.
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173
58. Compiling simple applications
The compiler used for all Linux systems is GCC
http://gcc.gnu.org
To compile a singlefile application, developed in C :
gcc –o test test.c
Will generate a test binary, from the test.c source file For C++ :
g++ -o test test.cc
The –Wall option enables more warnings
To compile sources files to object files and link the application :
gcc –c test1.c
gcc –c test2.c
gcc –o test test1.o test2.o
gcc automatically calls the linker ld
E-mail: [email protected]; http://www.wavedigitech.com Phone : 91-9632839173