Skip to main content

Posts

Showing posts from 2011

Linux - Bash Tips

What is the Bash Shell? The GNU Bourne-Again SHell (BASH) incorporates features from the C Shell (csh) and the Korn Shell (ksh) and conforms to the POSTIX 2 shell specifications. It provides a Command Line Interface (CLI) for working on *nix systems and is the most common shell used on Linux systems. Useful bash features will be the subject of the rest of this document. Bash's Configuration Files Because what I want to say here has already been written I will quote the section entitled "Files used by Bash" from freeunix.dyndns.org's  "Customizing your Bash environment" In your home directory, 3 files have a special meaning to Bash, allowing you to set up your environment automatically when you log in and when you invoke another Bash shell, and allow you to execute commands when you log out. These files may exist in your home directory, but that depends largely on the Linux distro you're using and how your sysadmin (if not you) has set up your acco...

Linux Tip - Command Line - How to list just directories

The simplest way of list just directories ls -d */ You can list the directories start with letter b ls -d b*/ Further more list the subdirectories of the directories start with letter b ls -d b*/*/ The outcome will be look like this backup/10-5-2007/ backup/lunatic/ bin/gdc/ backup/ccbe/ backup/wplbe/ backup/full/ bin/ffmpeg-0.4.9-p20051216/ Bare in mind the command lines above do not list out the hidden directories, to list hidden directories ls -d .*/ Yes, you can also list with details, and with nice colors. ls -d .*/ -l