Unix/Linux Reference

Unix/Linux Find directory by name using the find command

find . -maxdepth 4 -type d -name somedirectoryname -print

Unix/Linux Format drive using fdisk on Linux

Here's a short sum-up on how to (re-)format your hard- or usb drive from the command line using fdisk.

Ubuntu Ubuntu shortcut keys

Here's a handy list of shortcut key combinations for Ubuntu Linux:

Unix/Linux rsync quick backup

Rsync makes it very easy to do speedy professional backups copying only the differences between two specified files or directories.

Here's a quick example of backing up a directory recursively - in archive mode (-a) and verbally (-v) showing progress --progress in human readable format (-h) and deleting deleted files on the destiny location --delete (careful with that!!).

Ubuntu install gedit plugins

To install gedit plugins (amongst which - session-save possibillity) use the following aptitude command:

Samba Samba quick setup on Ubuntu 10.04

The following excerpt describes how to setup samba on ubuntu 10:

BASH Copying multiple files using the cp command

The man pages for the cp command don't tell you how you can copy multiple files and directories in one command. It's actually quite simple:

BASH use grep to find files containing text

You can use GNU grep to search a whole directory and print out all files containing a certain string. Very handy indeed. Here's an example

Ubuntu set static ip in Ubuntu or Debian

To configure a static IP (an IP that will never change) in Ubuntu Debian via Bash you must edit the file
/etc/networking/interfaces and put in something similar to the following:

MacOSX screenshot on mac

I always have to look this up for some reason :

to make a screen shot on a mac use any of the following:

Ubuntu Mount network drive using Samba

Use the following commands to mount a Windows or Samba share on the network:

MacOSX Mount smb share from command line

Mount a share on the network using samba.

Unix/Linux Linux file permissions

Octal digit Text equivalent Binary value Meaning 0 --- 000 All types of access are denied 1 --x 001 Execute access is allowed only 2 -w- 010 Write access is allowed only 3 -wx 011 Write and execute access are allowed 4 r-- 100 Read access is allowed only 5 r-x 101 Read and execute access are allowed 6 rw- 110 Read and write access are allowed 7 rwx 111 Everything is allowed

Ubuntu install curl extension for php

install curl extension for php

BASH Find Bash

find by name

Samba Quick easy Samba home network

Put something like this in smb.conf:

Unix/Linux Simple file operations

Unpack tarball

Unix/Linux Harddrive info and manipulation

list available harddrives (Debian / Ubuntu):

[x]