Notes by voodoo
Displaying notes 1 - 10
Created by voodoo on January 03, 2012 08:41:21
Last update: January 03, 2012 08:41:21
This is the command to print all regular files in the src folder but excluding all files within the .svn folders:
$ find src -name .svn -prune -o -type f -print
where -o is the or operator.
Created by voodoo on December 08, 2011 14:32:06
Last update: December 08, 2011 14:32:06
Use the read command to pause a shell script and give the user a chance to stop it:
#!/bin/sh
echo "Press CTRL-C to stop this scrip...
Created by voodoo on December 08, 2011 08:52:40
Last update: December 08, 2011 08:52:40
I don't know if there's a fool proof way to find out which Linux distro you are running on, but here are some ways you can try:
cat /proc/version
cat /etc/issue
cat /etc/*release
lsb_release -a
Results on Ubuntu 11.10 oneiric:
$ cat /proc/version
Linux version 3.0.0-13-gene...
Results on Red Hat Enterprise Server:
$ cat /proc/version
Linux version 2.6.18-128.1....
Created by voodoo on November 22, 2011 12:27:12
Last update: November 22, 2011 12:31:50
Unix hidden files are named starting with a dot ".".
To find hidden files in the current directory:
$ find . -type f -name '.*'
or
$ find . -type f | grep \\/\\.
To find hidden files in the marketing directory:
$ find marketing -type f -name '.*'
or
$ find marketing -type f | grep \\/\\.
Created by voodoo on November 18, 2011 14:12:37
Last update: November 18, 2011 14:12:49
Search Ubuntu packages at: http://packages.ubuntu.com/
Created by voodoo on July 14, 2010 23:37:46
Last update: November 16, 2011 12:00:33
Run gpedit.msc
Find Administrative Templates -> Windows Components -> Terminal Services -> Limit Maximum color depth.
Right click on "Limit maximum color depth", click "Properties", then select "Client Compatible".
Update: for Windows 7 the color depth policy was moved to Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Remote Session Environment
Created by voodoo on September 30, 2011 08:22:39
Last update: September 30, 2011 08:22:39
This iptables rule redirects all port 80 traffic from subnet 192.168.0.0/24 to 192.168.0.1 running HTTP proxy (say squid):
/usr/sbin/iptables -A PREROUTING -s 192.168.0.0/25...
Created by voodoo on September 04, 2011 14:48:52
Last update: September 04, 2011 14:49:40
If Ubuntu does not recognize the wifi adapter, use ndiswrapper and Windows XP driver instead:
Install the needed Ubuntu packages:
$ sudo apt-get install ndisgtk
If there's no Internet access, the needed packages are available from the Ubuntu live CD under the directory /pool/main/n . Install both ndiswrapper and ndisgtk .
Download and extract the Windows XP driver for your wifi adapter.
Install the Windows XP driver:
Browse to System/Administration/Windows Wireless drivers
Click Install New Driver
Select the .inf file, then click Install
Connect to wifi networks as you normally do.
Created by voodoo on September 04, 2011 14:23:17
Last update: September 04, 2011 14:25:05
I just installed Ubuntu 11.04 desktop on my old Dell laptop, but the cdrom is not auto-mounting. Normally this simply works.
I tried various things like adding cdrom to /etc/fstab and installing halevt (which failed), none worked. However, I found out that despite talks of using gnome-volume-manager etc, at least for this version of Ubuntu automount is managed by Nautilus (file manager): start gconf-editor and navigate to /apps/nautilus/preferences/ , media_automount should be checked (but it's checked by default, unless you changed it).
In the end, I wasn't able to make cdrom automount, although USB drives automounted fine. Instead of wasting more time to diagnose the problem, I manually mounted the cdrom drive:
$ sudo mount /dev/cdrom /cdrom
Created by voodoo on September 04, 2011 09:54:34
Last update: September 04, 2011 09:55:25
To see if Firefox is installed:
dpkg --get-selections | grep firefox
or
dpkg --get-selections firefox
or
dpkg --get-selections firefox*
To see status of Firefox:
dpkg -s firefox
or
dpkg -l firefox
To see locations of Firefox files:
dpkg -L firefox