Select Page

Some useful Unix/Linux Bash alias

Some useful Unix/Linux Bash alias

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.xalias 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 shotalias 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 directoryalias lowercaseallfiles=’for f in *; do mv $f `echo $f | tr [:upper:] [:lower:]`; done’
List all open connections to your serveralias listOpenConnections=’lsof –i’
List all internet connectionsalias listinternetconnection=’netstat –lptu’
find the 10 biggest in size directoriesalias dirsizes=’du -cks * | sort -n | tail –10′
Show open portalias openports='netstat -nape --inet'

About The Author

Cédric Walter

I worked with various Insurances companies across Switzerland on online applications handling billion premium volumes. I love to continuously spark my creativity in many different and challenging open-source projects fueled by my great passion for innovation and blockchain technology.In my technical role as a senior software engineer and Blockchain consultant, I help to define and implement innovative solutions in the scope of both blockchain and traditional products, solutions, and services. I can support the full spectrum of software development activities, starting from analyzing ideas and business cases and up to the production deployment of the solutions.I'm the Founder and CEO of Disruptr GmbH.

Categories