NINJA_LEARN_IR Telegram 760
Forwarded from Denver
🛠 چند alias کاربردی برای هر کاربر لینوکس
حتما با alias ها آشنایی دارین، همون لقب دادن به دستوراتمون.
کاربردش چیه؟ میتونیم کلی دستور طولانی یا حتی دستورایی که تایپ کردنشون هر دفعه مثل یه کابوس میمونه رو توی دستور مورد نظر خودمون خلاصه کنیم.
ساده تر بگیم، درواقع با اینکار داریم به شل(zsh, bash, fish) میگیم که دستور مورد نظر a معادل دستور طولانی b هست.


با این aliasها توی فایل ~/.bashrc یا ~/.zshrc می‌تونی کلی زمان تو ترمینال صرفه‌جویی کنی 💻⚡️

# ====== System Management ======
alias update="sudo apt update && sudo apt upgrade -y" # Fast system update
alias clean="sudo apt autoremove && sudo apt autoclean" # Clean cache and unnecessary packages
alias reboot="sudo reboot" # Reboot the system
alias ping="ping -c 5" # Ping with 5 packets

# ====== Navigation Shortcuts ======
alias home='cd ~' # Go to home directory
alias cd..='cd ..' # One directory up
alias ..='cd ..' # One directory up (short)
alias ...='cd ../..' # Two directories up
alias ....='cd ../../..' # Three directories up
alias .....='cd ../../../..' # Four directories up

# ====== File Search ======
alias f="find . -name" # Find file by name in current directory and subdirectories

# ====== Listing (ls) Aliases ======
alias la='ls -Alh' # List all files including hidden
alias ls='ls --color=always' # Enable colored output
alias lx='ls -lXBh' # Sort by extension
alias lk='ls -lSrh' # Sort by size
alias lc='ls -lcrh' # Sort by change time
alias lu='ls -lurh' # Sort by access time
alias lr='ls -lRh' # Recursive listing
alias lt='ls -ltrh' # Sort by date
alias lw='ls -xAh' # Wide listing format
alias ll='ls -Flsh' # Long listing format with type indicators
alias labc='ls -lap' # Alphabetical listing with hidden files
alias lf="ls -l | egrep -v '^d'" # List only files
alias ldir="ls -l | egrep '^d'" # List only directories

🔗برای راحتی کار میتونید فایل آماده ی alias هارو از لینک زیر دانلود کنید:
فایل آماده ی alias ها

📌 نکته: بعد از اضافه کردن aliasها، فراموش نکن که ترمینالت رو یه بار ببندی و باز کنی یا دستور زیر رو وارد کنی:
source ~/.bashrc  # or ~/.zshrc


#️⃣ #linux #terminal #tools


🐧 CHANNEL | GROUP
13



tgoop.com/ninja_learn_ir/760
Create:
Last Update:

🛠 چند alias کاربردی برای هر کاربر لینوکس
حتما با alias ها آشنایی دارین، همون لقب دادن به دستوراتمون.
کاربردش چیه؟ میتونیم کلی دستور طولانی یا حتی دستورایی که تایپ کردنشون هر دفعه مثل یه کابوس میمونه رو توی دستور مورد نظر خودمون خلاصه کنیم.

ساده تر بگیم، درواقع با اینکار داریم به شل(zsh, bash, fish) میگیم که دستور مورد نظر a معادل دستور طولانی b هست.


با این aliasها توی فایل ~/.bashrc یا ~/.zshrc می‌تونی کلی زمان تو ترمینال صرفه‌جویی کنی 💻⚡️

# ====== System Management ======
alias update="sudo apt update && sudo apt upgrade -y" # Fast system update
alias clean="sudo apt autoremove && sudo apt autoclean" # Clean cache and unnecessary packages
alias reboot="sudo reboot" # Reboot the system
alias ping="ping -c 5" # Ping with 5 packets

# ====== Navigation Shortcuts ======
alias home='cd ~' # Go to home directory
alias cd..='cd ..' # One directory up
alias ..='cd ..' # One directory up (short)
alias ...='cd ../..' # Two directories up
alias ....='cd ../../..' # Three directories up
alias .....='cd ../../../..' # Four directories up

# ====== File Search ======
alias f="find . -name" # Find file by name in current directory and subdirectories

# ====== Listing (ls) Aliases ======
alias la='ls -Alh' # List all files including hidden
alias ls='ls --color=always' # Enable colored output
alias lx='ls -lXBh' # Sort by extension
alias lk='ls -lSrh' # Sort by size
alias lc='ls -lcrh' # Sort by change time
alias lu='ls -lurh' # Sort by access time
alias lr='ls -lRh' # Recursive listing
alias lt='ls -ltrh' # Sort by date
alias lw='ls -xAh' # Wide listing format
alias ll='ls -Flsh' # Long listing format with type indicators
alias labc='ls -lap' # Alphabetical listing with hidden files
alias lf="ls -l | egrep -v '^d'" # List only files
alias ldir="ls -l | egrep '^d'" # List only directories

🔗برای راحتی کار میتونید فایل آماده ی alias هارو از لینک زیر دانلود کنید:
فایل آماده ی alias ها

📌 نکته: بعد از اضافه کردن aliasها، فراموش نکن که ترمینالت رو یه بار ببندی و باز کنی یا دستور زیر رو وارد کنی:
source ~/.bashrc  # or ~/.zshrc


#️⃣ #linux #terminal #tools


🐧 CHANNEL | GROUP

BY Ninja Learn | نینجا لرن


Share with your friend now:
tgoop.com/ninja_learn_ir/760

View MORE
Open in Telegram


Telegram News

Date: |

Telegram users themselves will be able to flag and report potentially false content. Telegram channels enable users to broadcast messages to multiple users simultaneously. Like on social media, users need to subscribe to your channel to get access to your content published by one or more administrators. In the next window, choose the type of your channel. If you want your channel to be public, you need to develop a link for it. In the screenshot below, it’s ”/catmarketing.” If your selected link is unavailable, you’ll need to suggest another option. Hui said the time period and nature of some offences “overlapped” and thus their prison terms could be served concurrently. The judge ordered Ng to be jailed for a total of six years and six months. The group’s featured image is of a Pepe frog yelling, often referred to as the “REEEEEEE” meme. Pepe the Frog was created back in 2005 by Matt Furie and has since become an internet symbol for meme culture and “degen” culture.
from us


Telegram Ninja Learn | نینجا لرن
FROM American