Skip to content

A comprehensive collection of practical Linux shell script examples and command-line snippets designed for beginners and intermediate users.

Notifications You must be signed in to change notification settings

PeradheepY/linux_shell_examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Linux Shell Examples

A comprehensive collection of practical Linux shell script examples and command-line snippets designed for beginners and intermediate users. This repository serves as a learning resource for understanding shell scripting fundamentals and common Linux command-line operations.

Features

  • Real-world shell script samples - Practical examples covering common Linux tasks and operations
  • Useful command-line snippets - Ready-to-use code snippets for everyday command-line tasks
  • Well-commented examples for learning - Each script includes clear comments explaining the functionality
  • Suitable for both beginners and intermediate users - Progressive examples from basic to more advanced concepts

What You'll Find

This repository contains shell scripts organized by date, covering various aspects of Linux shell scripting:

Basic Commands

  • echo.sh - Display text and variables
  • pwd.sh - Working directory operations and file counting
  • list.sh - Directory listing with conditional logic
  • cat - File content display
  • date.sh - Date and time operations

File Operations

  • create_file - Interactive file creation
  • copy - File copying operations
  • move - File moving operations
  • del_file - File deletion
  • rename - File renaming
  • file_permission - Managing file permissions
  • file_exits - File existence checking

Directory Operations

  • mkdir.sh - Directory creation
  • check_number_of_files - File counting in directories
  • find_largest_file - Finding the largest file in a directory

System Information

  • display_user.sh - User information display
  • user.sh - User-related operations
  • disk.sh - Disk usage information
  • uptime - System uptime information
  • process - Process management

Programming Constructs

  • for1 - For loop examples
  • shebang - Proper script headers and basic scripting

String Operations

  • reverse_string - String manipulation
  • word_search - Text searching operations
  • first_ten - Text processing operations

Target Audience

This repository is designed for:

  • Beginners learning Linux command-line basics and shell scripting fundamentals
  • Intermediate users looking to expand their shell scripting knowledge
  • Students studying Linux system administration or development
  • Professionals seeking quick reference examples for common tasks

Getting Started

  1. Clone this repository to your local machine
  2. Navigate to the 17_02_25 directory to explore the examples
  3. Make scripts executable: chmod +x script_name
  4. Run scripts: ./script_name

Usage

Each script is designed to be self-contained and includes user prompts where appropriate. Simply execute the scripts to see them in action and study the code to understand the underlying concepts.

Contributing

Feel free to contribute additional examples or improvements to existing scripts. Please ensure any new scripts follow the same commenting and formatting standards as the existing examples.

About

A comprehensive collection of practical Linux shell script examples and command-line snippets designed for beginners and intermediate users.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages