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.
- 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
This repository contains shell scripts organized by date, covering various aspects of Linux shell scripting:
- 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
- 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
- mkdir.sh - Directory creation
- check_number_of_files - File counting in directories
- find_largest_file - Finding the largest file in a directory
- display_user.sh - User information display
- user.sh - User-related operations
- disk.sh - Disk usage information
- uptime - System uptime information
- process - Process management
- for1 - For loop examples
- shebang - Proper script headers and basic scripting
- reverse_string - String manipulation
- word_search - Text searching operations
- first_ten - Text processing operations
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
- Clone this repository to your local machine
- Navigate to the
17_02_25directory to explore the examples - Make scripts executable:
chmod +x script_name - Run scripts:
./script_name
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.
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.