This .bashrc file provides a comprehensive set of configurations, aliases, and functions to enhance your Bash shell experience. It includes history management, shell options, custom prompts, and various utility functions.
- Prevents duplicate lines and commands starting with space from being saved in history
- Sets a large history size (100,000 commands) and file size (2,000,000 lines)
- Ignores certain common commands in history
- Appends to history file immediately after each command
- Adds timestamps to history entries
- Enables case-insensitive filename completion
- Corrects minor errors in directory spelling
- Combines multiline commands into one history entry
- Updates window size after each command
count: Count files in current directorydecomment: Remove full-line comments and blank linesmnt: List mounted hard drives..,...,....,.....: Easy directory navigationpath: Display formatted PATHh: Search command history+x,-x: Chmod shortcutsols: Octalls -l
A comprehensive virtual environment manager for Python projects.
Usage:
venv_manager {create|remove|activate|deactivate|status|howto} [venv_dir] [python_executable]A versatile function for extracting and compressing various types of archives.
Usage:
pac [OPTIONS] file1 [file2 ...]Options:
-x,--extract: Extract mode (default)-c,--compressformat: Compress mode (specify format: tar.gz, tar.bz2, zip, 7z)-v,--verbose: Verbose mode-t,--targetdir: Specify target directory-d,--delete: Delete original file(s) after operation-e,--excludepattern: Exclude files/directories matching the pattern
A function for copying files/directories locally or to/from remote systems, supporting both rsync and scp.
Usage:
rcopy [OPTIONS] source destinationOptions:
-z,--compress: Compress the transfer-m,--move: Move files instead of copying-u,--userUSERNAME: Specify username for remote connections-p,--portPORT: Specify SSH port-i,--identityFILE: Specify SSH identity file-l,--limitRATE: Set bandwidth limit (for rsync only)-e,--excludeFILE: Specify exclude file or pattern-s,--use-scp: Force using SCP instead of rsync-v,--verbose: Verbose output
An enhanced version of the du command with color-coded output and a bar chart.
Usage:
dug [directory]mkd: Create a new directory and enter itflip: Swap two files or directoriesevi: Create and edit a new script filetopm: Display top 20 memory-consuming processestopc: Display top 20 CPU-consuming processes
-
Back up your existing
.bashrcfile:cp ~/.bashrc ~/.bashrc.backup
-
Copy this
.bashrcfile to your home directory:cp path/to/this/bashrc ~/.bashrc -
Source the new
.bashrcfile:source ~/.bashrc
Feel free to modify and extend this .bashrc file to suit your specific needs. You can add new aliases, functions, or adjust existing configurations.
If you have improvements or bug fixes, please open an issue or submit a pull request on GitHub.
This .bashrc configuration is released under the MIT License. See the LICENSE file for details.