Linux Programming and Scripting
Linux Programming and Scripting
Use the unzip command to extract files UNIX is a multiuser, multitasking operating
from a zip archive. system developed in 1969 at Bell Labs by
Ken Thompson and Dennis Ritchie.
Unzipping Files
Example: unzip archive.zip to restore the
original files. It consists of a kernel that manages system
resources and a shell that interprets user
What is UNIX? commands.
Use gpg to encrypt zip files for added Zipping and Unzipping Concepts
security. Linux Basics
UNIX architecture includes the kernel,
Encrypting Zip Files shell, commands and utilities, and a
Example: gpg -c archive.zip to create an hierarchical file system.
encrypted version.
Use the -P option in the zip command to Linux is a popular open-source version of
set a password for a zip file. UNIX, designed for compatibility with
UNIX systems.
Password Protecting Zip Files
Example: zip -P password archive.zip to
create a password-protected archive. Developed by Linus Torvalds in 1991, Linux
has evolved into a mature operating
Introduction to Linux system supporting various hardware
platforms.
Searching for Files and The kernel is the core part of Linux,
locate: Quickly finds files using a pre-built responsible for interacting with hardware
database. Directories and managing system resources.
Using Locate Command
Example: locate "filename" to find all Kernel
occurrences of a file. It provides abstraction to hide low-level
hardware details from applications.
System users: Run background processes. Linux supports multiple users accessing
system resources simultaneously and
User Types Basic Features of Linux allows multiple applications to run
Regular users: Log in and run interactive
processes. Linux Programming Multi-User and Multiprogramming
concurrently.
useradd: Command to create a new user. and Scripting Linux employs various security measures,
including user authentication and
Security controlled access to files.
passwd: Command to set or change a
user's password. Creating and Deleting User Accounts
Linux Users and Groups
userdel: Command to remove a user
account. In Linux, everything is treated as a file,
including directories and hardware device
drivers.
Groups are collections of users that share
access permissions.
Overview
The file system is organized hierarchically,
About Groups starting from the root directory (/).
Each user has a user ID (UID) and belongs
to a group identified by a group ID (GID).
Regular files: Contain data like text and
executable files.
id: Prints user and group IDs. Directory files: Contain lists of files.
Types of Files
man: Displays manual pages for Special files: Include block files, character
commands. Common Commands File System of Linux device files, named pipes, symbolic links,
and sockets.
cal: Displays the calendar.
/: Root directory containing all files and
date: Prints the current date and time. directories.