lol internet!1
June 29th, 2010

Linux: Chmod nur auf Dateien bzw. Verzeichnisse

Dateien: find . -type f -exec chmod 664 {} \;

Verzeichnisse: find . -type d -exec chmod 775 {} \;

by etche | Posted in linux stuff | No Comments » | Tags: ,
September 14th, 2009

3D-Beschleunigung für Virtualbox

http://thinksilicon.hobby-site.com/54/HowTo-VirtualBox-3D-Beschleunigung.html

klingt nicht so schlecht…

by etche | Posted in howto's, linux stuff | No Comments » | Tags: ,
August 28th, 2009

Fix für das Font-Rendering vom Firefox 3.5 in Ubuntu

Firefox-3.5 holt sich seine Einstellungen nicht von Gnome, sondern von fontconfig, deswegen sehen die Schriften unscharf aus. Folgendes sollte das Problem unter Ubuntu 9.04 beheben:

cd /etc/fonts/
sudo mv conf.d/10-hinting-slight.conf .
sudo ln -s conf.avail/10-hinting-slight.conf conf.d/
sudo mv conf.d/10-hinting.conf .
sudo ln -s conf.avail/10-hinting.conf conf.d/
sudo dpkg-reconfigure fontconfig

Hübsch, gell?

by etche | Posted in howto's, linux stuff | No Comments » | Tags: , , , , ,
July 21st, 2009

iostat / vmstat

2 tools um unter Linux eine Übersicht über I/O und Virtual Memory auf der Konsole anzuzeigen. Ähnlich netstat, kannte ich noch gar nicht.

http://en.wikipedia.org/wiki/Vmstat

http://en.wikipedia.org/wiki/Iostat

by etche | Posted in linux stuff | No Comments » | Tags: , ,
May 11th, 2009

Dateien umbenennen deluxe

via: http://debaday.debian.net/2007/06/13/mmv-mass-moving-and-renaming-files/

mmv: Mass moving and renaming files

June 13th, 2007 by ana

Mmv is command-line tool which allows the user to move, rename, copy, append and link large amounts of files with a single command. The tool is especially useful when you need to rename a lot of files that have similar filenames, yet subtle differences.

Although mmv does more than just renaming files, this article will focus only on renaming because that is what I use it for the most. The tool is best explained using an example.

Suppose you have the following files in a directory:

foo1.png
foo2.png
bar3.png

You want all the files that start with ‘foo’ to instead start with ‘bar’. In this case it could easily be done manually, but suppose there are hundreds of files! You’d soon be forced to start shell-scripting some solution. But mmv is the perfect tool for this job:

mmv "foo*.png" "bar#1.png"

The above command will result in the following files:

bar1.png
bar2.png
bar3.png

Explanation

From pattern

Mmv matches the files using the wildcard you gave (the ‘From’ pattern). Then it will rename the matched files according to the second argument (the ‘To’ pattern). The ‘From’ pattern can take all the usual shell wildcards such as ‘*’, ‘?’ and ‘[]’. Remember that you need to enclose the patterns with quotes, otherwise they will be expanded by the shell and mmv won’t understand them!

To pattern

The ‘#1′ in the ‘To’ pattern is a wildcard index. It matches the first wildcard found in the ‘From’ pattern. A ‘#2′ in the ‘To’ pattern would match the second second wildcard, etc. Mmv replaces any occurrences of wildcard indexes with the text for the corresponding wildcard in the ‘From’ pattern. In the example above, ‘#1′ matches the number after ‘foo’ and in front of the period. Note that ‘??’ are actually two wildcards, both of which match a single character!

More examples

The ‘From’ and ‘To’ pattern can also be used to switch around stuff in filenames:

abc_123.txt
def_456.txt
ghi_789.txt

mmv "*_*.txt" "#2_#1.txt"

Would result in:

123_abc.txt
456_def.txt
789_ghi.txt

Another nifty trick mmv can do is changing the case of text matched by a wildcard. To do this, you place a ‘l’ (lowercase) or ‘u’ (uppercase) between the ‘#’ and the number in the ‘To’ pattern:

john.txt
pete.txt

mmv "?*.txt" "#u1#2.txt"

This results in:

John.txt
Pete.txt

Safety

Mmv tries to be as safe as possible to avoid collisions in renaming which might cause files to be deleted. If, for instance, the result of the renaming would cause two different files to get the same name (thereby overwriting one), mmv will issue a collision warning and abort.

Mmv also tries to gracefully handle a rename that causes one of the resulting filenames to be identical to one of the source filenames. For instance:

a
aa

mmv "*" "a#1"

This does not overwrite the ‘aa’ file with the ‘a’ file but instead results, as expected, in:

aa
aaa

Availability

Mmv has been available in Debian at least since v3.1 (’Sarge’) and in Ubuntu since Warty. apt-get install mmv will install it for you.

Notes

  • Renaming directories can only be done with the -r switch.
  • Remember to enclose the ‘To’ and ‘From’ parameters in quotes!
by etche | Posted in linux stuff | No Comments » | Tags: , , ,
April 23rd, 2009

SSH as a Socks Proxy

Linux:

$ ssh -2 -N -l USER -D1234 host.tld

  • -2 only use SSH version 2
  • -N execute nothing on the remote host
  • -l user to connect as
  • -D the local port, can be anything >1024

just add localhost:port as the socks proxy in any program that supports it.

by etche | Posted in linux stuff | No Comments » | Tags: , , ,
April 21st, 2009

tunnel SSH over HTTP Proxy

1. get corkscrew from here

2. add “ProxyCommand /path/to/corkscrew proxy.example.com 8080 %h %p” to ~/.ssh/config

3. ???

4. Profit!

by etche | Posted in linux stuff | No Comments » | Tags: , ,
April 20th, 2009

change environment variables on the fly

maybe with envstore?

by etche | Posted in linux stuff | No Comments » | Tags: , ,
April 20th, 2009

Ideapad S10e touchpad sensitivity

Since i couldn’t find anything on the net, here’s a quick howto on how to change the sensitivity of the Synaptics touchpad on a Lenovo Ideapad s10e running ArchLinux. Should probably work on other hardware too, don’t know. A howto on general setup can be found here.

X and hal work pretty much out of the box, but the touchpad is way too sensitive.

To change that, open /etc/hal/fdi/policy/10osvendor/11-x11-synaptics.fdi and add the following three lines:

<merge key=”input.x11_options.SHMConfig” type=”string”>true</merge>
<merge key=”input.x11_options.MinSpeed” type=”string”>0.10</merge>
<merge key=”input.x11_options.MaxSpeed” type=”string”>0.75</merge>

restart hal & X and the touchpad should be much more usable.

by etche | Posted in linux stuff | No Comments » | Tags: , , ,













Powered by Wordpress using the theme bbv1