Deutsch English
Your feedback:
Did you like this page? vote3 Yes
vote2 Partly
vote1 No
Your comment?

Add your email address, if you want to get a response

Your name, if you like

Do not change this:
Feedback
Search

Interactive Programs

06-08-2005 13.09

Xemacs emacs

Indent everythingM-x indent-region
Forward searchC-s
Backward searchC-r
Repeat old searchesC-s M-p
C-s M-n
Regexp searchC-M-s
Search word under the cursor (beginning at the cursor position)C-s C-w
Show only lines which match your regular expressionM-x occur RET foo
M-x list-matching-lines RET foo
Removes lines which matches regular expressionsM-x flush-lines
Removes lines which does not match regular expressionM-x keep-lines
Counts the number of occurrences for the given expressionM-x count-matches RET foo
Execute grep and get outputM-x grep RET grep -e root /etc/passwd
Search and replaceM-%
Set markC-SPACE
Mark paragraphM-h
Mark whole bufferC-x h
Cut regionC-w
Copy regionESC-w
Insert regionC-y
Split WindowC-x 2
Split Window side by sideC-x 3
Jump to an other part of the windowC-x o
Unsplit WindowC-x 1
New WindowC-x 5 2
Close WindowC-x 5 0
Close BufferC-x k RET
Switch to another bufferC-x b RET
Insert a spoiler (^L):C-q C-l
Record Macro
StartC-x (
StopC-x )
ExecuteC-x e
Edit last macroC-x C-k
Replaces newlinesM-q
Make current word upper caseM-u
Make current word lower caseM-l
Compare two files, buffers or directoriesM-x ediff
M-x ediff-buffers
M-x ediff-directories
Emacs file managerM-x dired
The last 4 Words before the current cursor position are automatically inserted whenever you type fooC-u 4 C-x a + RET foo
M-x list-abbrevs
M-x edit-abbrevs
M-x write-abbrev-file RET ~/.abbrev_defs
M-x abbrev-mode
Example init.el

Search and Replace and line breaks

You can use this
C-q C-j
to insert a line break with search and replace.

Select Columns, Copy and Past columns

In emacs you can not only select rows for copy and paste but also columns.
In order to achieve this, just move the cursor to the top left position of your column (in this example we assume it should start at the letter A). Now select CTRL-SPACE to start the selection.
xx Ax xx
xx xx xx
xx xB xx
xx xx xx

Afterwards, move the cursor to the lower right corner of your column. (We assume this will be at the letter B). Now you can issue
M-x kill-rectangle
The column disapears

xx  xx
xx xx
xx xx
xx xx xx

You can insert it again with the command
M-x yank-rectangle

Open remote files and directories

C-x C-f RET /username@ftp.example.com:/foo/bar.txt RET
Change to passive mode
M-x customize-option RET ange-ftp-try-passive-mode RET

Links

03-08-2009 02.55

VI

Command Line

Restore filesvi -r

Modes

Command modeESC
Insert modei
Append after cursor modea
Append after linebreak modeA
Replace one characterr
Replace modeR

Files

Open file:e
Reload file:e!
Open file, jump to the end of the file:e +
Open file, jump to line z:e +z
Show filename + linenumber:f
Next file:n
Save file:w (:w!)
Quit:q (:q!)
Save + Quit:wq (ZZ)

Navigation

Move one position to the left, right, up, downh l k j
Move one page nach upCTRL f
Move one page downCTRL b
Move to the beginning of the file0
Move to the end of the file$
Move to line z:z NR
Move to the beginning of the line^
Move to the end of the line$

Edit

Delete everything from here to the end of the lineD
Delete this linedd
Delete this characterx (dl)
Copy this liney
Copy the next n linesnyy
Paste after this linep
Paste before this lineP
Undou
Undo this lineU

Search, Replace

Search/
Search backwards?
Continue searchn
Continue search but backwardsN
Replace the next alt with neu:s/alt/neu/
Replace in this line all alt with neu:s/alt/neu/g
Replace from line anfang till line ende in each line the first alt with neu
(use $ for the last line)
:[anfang,ende]s/alt/neu/
Example::3,5s/Fogel/Vogel/

General

Show user settings:set
Show all settings:set all
Repeat command.
18-05-2008 15.06

screen

Start a program with screenscreen prg
Send the program to the backgroundC-a C-d
Restore the programscreen -r PID
06-08-2005 13.09

blender

Object scale (x,y,z direction)s, s x, s y, s z
Object rotate (x,y,z direction)r, r x, r y, r z
Object move (x,y,z direction)g, g x, g y, g z
Edit / objekt ModeTAB
Duplicate objektSHIFT d
Join objektsCTRL J
06-08-2005 13.09

Stow

mkdir /usr/local/stow/paket
cd /usr/local/src/
tar xzf quelle.tgz
cd quellpaket
./configure
make
make install prefix=/usr/local/stow/paket
cd /usr/local/stow
stow -n paket
stow paket
06-08-2005 13.09

Bochs

Bochs Manual
  • bximage
  • .bochsrc
    romimage: file=/usr/share/bochs/BIOS-bochs-latest, address=0xf0000
    megs: 256
    vgaromimage: /usr/share/vgabios/vgabios.bin
    ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
    ata1: enabled=0, ioaddr1=0x170, ioaddr2=0x370, irq=15
    ata2: enabled=0, ioaddr1=0x1e8, ioaddr2=0x3e0, irq=11
    ata3: enabled=0, ioaddr1=0x168, ioaddr2=0x360, irq=9
    # bximage -> X
    ata0-master: type=disk, path="c.img", mode=flat, cylinders=X, heads=X, spt=X
    #boot: disk
    boot: cdrom
    ips: 5000000
    #sb16: midimode=1, midi=/dev/midi00, wavemode=1, wave=/dev/dsp, loglevel=2, log=/dev/stdout, dmatimer=600000
    ne2k: ioaddr=0x240, irq=9, mac=12:34:56:78:90:01, ethmod=linux, ethdev=eth0
    usb1: enabled=1, ioaddr=0xFF80, irq=10
06-08-2005 13.09

GNU Plot

Links

GNUPLOT GNUPLOT - A Brief Manual and Tutorial

Function -> Diagram

gnuplot> plot [-pi:pi] sin(x), cos(x)
gnuplot> splot sin(x*y/20)
gnuplot> plot x**2
gnuplot> set out "/tmp/my_output.ps"
gnuplot> set terminal postscript portrait enhanced color

Data -> Diagram

gnuplot> plot "myfile.dat" using 1:2 title "2*x" with lines, "myfile.dat" using 1:3 title "x*x" with lines
myfile.dat:
0 0 1
1 2 2
2 4 4
3 6 8
4 8 16
5 10 32

Time / Date Axis

gnuplot> set xdata time
gnuplot> set timefmt "%Y%j"
gnuplot> set format x "%Y_%m"

Even More GNU Plot Commands

set boxwidth 0.1
set yrange [0:60]
set yrange [0:*]
set xrange [-1.5:1.5]

set xlable "Foo"

set format y '%g MB/s'

set xtics ('foo' 1, '2 bar' 2)
set mytics 2

set grid
set style fill pattern border

plot "myfile.dat" using 1:2 title "foo" with boxes, "gp" using 1:3 title "bar" with boxes

set terminal png size 800 600
set output "/tmp/my_output.png"

replot
05-12-2008 21.58

cdrdao

toc Datei

Audio-Tracks

Without leading break
TRACK AUDIO
NO COPY
FILE "01.wav" 00:00:00
With a 10 second leading break
TRACK AUDIO
NO COPY
SILENCE 00:10:00
START
FILE "01.wav" 00:00:00
Only the part from 3 minutes 5 seconds to 3 minutes 35 seconds
TRACK AUDIO
NO COPY
FILE "01.wav" 03:05:00 00:30:00
Part from 1 minute to 1 minute 30 seconds from file 01.wav and from file 02.wav everything from 2 minutes. After 1 minute and 30 seconds the index is increased
TRACK AUDIO
FILE "01.wav" 01:00:00 00:30:00
SILENCE 00:02:00
FILE "02.wav" 02:00:00
INDEX 01:30:00
Take all wav files beneath the current folder and create a toc file for an audio CD without breaks
{
echo CD_DA;
find . -name "*.wav" | while read line;
do
echo "TRACK AUDIO";
echo "NO COPY";
echo "FILE \"$line\" 00:00:00";
echo;
done
} > myaudiocd.toc
06-08-2005 13.09

Ethereal

Filter

ethereal filter
(not tcp.port eq 22 and ip.addr eq 10.0.0.3 )
!(ip.addr eq 10.0.0.3)
06-08-2005 13.09
Powered by PHP Created with Xemacs Valid XHTML 1.0! Valid CSS!