Support

Forums

Contact Me

Some useful Unix/Linux Bash alias

tatice-linux-tux-10409

Some useful Bash Linux alias taken from my user profile. If you have a long command that you type frequently consider putting it in as an alias.

In computing, alias is a command in various command line interpreters (shells) such as Unix shells, 4DOS/4NT and Windows PowerShell, which enables a replacement of a word with another string. It is mainly used for abbreviating a system command, or for adding default arguments to a regularly used command. [WikiPedia]

Description  
Find all directories and and chmod them to rwxr.xr.x alias fixpermD='find . -type d -exec chmod 755 {} \;'
Find all files and and chmod them to rw.r..r.. alias fixpermF='find . -type f -exec chmod 644 {} \;'
Both above and set recursively user and user group in one shot alias fixUserAPerms='fixpermF; fixpermD; chown -R userA .;chgrp -R usergrp .'
Make a directory and all files recursively read only, secure but a pain to maintain. see next  alias ro='find . -type f -exec chmod 444 {} \;find . -type d -exec chmod 555 {} \;'
Make a directory and all files recursively read write, just the time to update your site. alias rw='find . -type f -exec chmod 644 {} \;find . -type d -exec chmod 755 {} \;'
Lower case all files in current directory alias lowercaseallfiles='for f in *; do mv $f `echo $f | tr [:upper:] [:lower:]`; done'
List all open connections to your server alias listOpenConnections='lsof –i'
List all internet connections alias listinternetconnection='netstat –lptu'
find the 10 biggest in size directories alias dirsizes=’du -cks * | sort -n | tail –10'
Show open port alias openports='netstat -nape --inet'
You might also like:
Oracle ORA-00054: resource busy and acquire with NOWAIT spec
78 days ago
Oracle ORA-00054: resource busy and acquire with NOWAIT spec
ORA-00054: resource busy and acquire with NOWAIT specified Cause: Resource interested is busy.
Oracle Please set ORACLE_UNQNAME to database unique name
405 days ago
Oracle Please set ORACLE_UNQNAME to database unique name
if you encounter this error while starting oracle /etc/init.d/oraemctl start Starting Oracle EM D
Install XEN Server without an Optical Drive
599 days ago
Install XEN Server without an Optical Drive
Citrix XenServer is a complete, managed server virtualization platform built on the powerful Xe
Map Synology network drive under linux
1032 days ago
Map Synology network drive under linux
How to mount your Synology NAS (or any other NAS brand) shared folder under Linux using CIFS. C
Advanced Oracle Weblogic start/stop script
1034 days ago
Advanced Oracle Weblogic start/stop script
The Oracle WebLogic 11g application server product line is the industry's most comprehensive J
Basic operations with XEN server: export, import of VM templ
1034 days ago
Basic operations with XEN server: export, import of VM templ
More and more I am using XEN at work, and here is a small how to of some very common operations.
blog comments powered by Disqus

Donations

Thank You for supporting my work