Category: bash
-
RPM – Verify if a package is already installed
Command to search for an installed package in .rpm systems rpm –verify mysql
-
List folders with a slash
Option for ls command to list directories with and ending slash. Just to visualize directories in a different way. ls -p
-
Linux – Mount Bind
An example of mounting with bind. mount –bind Folder NewFolder
-
Enable apache modules
You can enable mods in ubuntu for apache with a2enmod command. To disable a module you can use a2dismod. Just remeber to pass module name as an argument. sudo a2enmod modulename
-
Aliases examples
Some aliases examples:/ alias compassing=’compass watch’ alias touchcompass=’compass create’ alias pbrew=’pythonbrew’ # == CoffeeScript Aliases == # alias coffee_pour=’coffee -o build -c source/*.coffee’ alias coffee_brew=’coffee –watch -o brew –compile source/*.coffee’ # file.coffee alias coffee_grind=’coffee –join grind/project.js –compile source/*.coffee’ # src/*.coffee alias coffee_smell=’coffee -bpe’ # == Dir navigation == # alias ..=’cd ..’ alias .=’pwd’ alias…
-
Create a filesystem in a file
Some times you need a new filesystem, for testing purposes or for whatever and you dont have access to a physical device. You can create a filesystem within a file as follows: dd if=/dev/zero of=myfsys bs=512M count=1 # creating a 512M zeros file mke2fs myfilesys # creating a file system out of the file mount…
-
Add an existing user to existing group in Linux
#add the user to the supplemental group(s) usermod -a -G group user #Change existing user primary group to www: usermod -g www user
-
Mounting shared folder in a linux guest in virtualbox
It took me sometime to find out how to do this. mount -t vboxsf SharedFolder /mnt/folder
-
Get MAC address of a host in your lan
With arp command you can find out what mac address any host in your lan has. > arp 192.168.0.12 Address HWtype HWaddress Flags Mask Iface 192.168.0.12 ether 00:0F:AE:34:03:07 C eth0