zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

Aptitude search

October 31, 2010 by Igor Drobot Leave a Comment

Very useful search hack for aptitude, to compare package versions. Normaly you see the versions if you open aptitude and it takes to much time.

1
aptitude search virtualbox -F '%p%V'

aptitude search virtualbox -F '%p%V'

Filed Under: Bash, Linux Tagged With: aptitude, aptitude search

‘Argument list too long’

October 18, 2010 by Igor Drobot Leave a Comment


root@web2:$ rm pe-warn-*.bz2
-bash: /bin/rm: Argument list too long

This peoblem happens when you are trying to delete too many files in a directory at the same time – it seems rm has special limits …

To solve the problem:
Use:

1
find . -name 'pe-warn-*.bz2' | xargs rm

find . -name 'pe-warn-*.bz2' | xargs rm

or

1
find . -name "pe-warn-*.bz2" -delete

find . -name "pe-warn-*.bz2" -delete

Filed Under: Bash, Debian, Linux, Ubuntu Tagged With: bash, limit, rm

Data Recovery

October 5, 2010 by Igor Drobot Leave a Comment

Each of you looses already some important files like photos or important documents.
After a normal Windows crash it’ s not a problem to get all your data back.
I show you some methods to get your data back.

These two examples are taken directly from the ddrescue info pages.

Example 1: Rescue an ext3 partition in /dev/hda2 to /dev/hdb2

1
2
3
dd_rescue /dev/hda2 /dev/hdb2 -l logfile.txt
e2fsck -v -f /dev/hdb2
mount -t ext3 -o ro /dev/hdb2 /mnt

dd_rescue /dev/hda2 /dev/hdb2 -l logfile.txt e2fsck -v -f /dev/hdb2 mount -t ext3 -o ro /dev/hdb2 /mnt

If you have a damaged hard disk /dev/sda1 and you have an empty space hard disk /dev/sdb1 You can copy data from /dev/sda1 to /dev/sdb1 use the following commnd

1
2
3
dd_rescue /dev/sda1 /dev/sda2/backup.img
# To mount use:
mount -t ext3 /dev/sda2/backup.img mnt/ -o loop

dd_rescue /dev/sda1 /dev/sda2/backup.img # To mount use: mount -t ext3 /dev/sda2/backup.img mnt/ -o loop

Example 2: Rescue a CD-ROM in /dev/cdrom

1
ddrescue -b 2048 /dev/cdrom cdimage logfile

ddrescue -b 2048 /dev/cdrom cdimage logfile

Filed Under: Bash, Debian, Linux, Ubuntu Tagged With: dd, dd_rescue. restore data, HDD recovery

SSH trick to improve your system security

September 25, 2010 by Igor Drobot Leave a Comment

This ASCII-art graph represents your host’s public key, which uniquely identifies (or at least, it better damn should uniquely identify!) it. This representation was added mainly because it is way easier to be able to visually record the shape of your most frequently used hosts.

Enable visualization for hostkeys:

1
2
id@acer:~$ cat .ssh/config 
VisualHostKey   yes

id@acer:~$ cat .ssh/config VisualHostKey yes

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
id@acer:~$ ssh root@192.168.1.3
Host key fingerprint is b6:dc:cb:ff:33:83:aa:03:56:94:0c:bc:7f:38:cf:b7
+--[ RSA 2048]----+
|     ..o .       |
|      . +        |
|       o         |
|      . .        |
|       oS.       |
|      oo+o.      |
|     . .o=.  .   |
|        ..o.o +  |
|        .o++Eo.+ |
+-----------------+
root@192.168.1.3's password: 
Linux piper 2.6.26-2-xen-686 #1 SMP Mon Jun 21 10:37:05 UTC 2010 i686

id@acer:~$ ssh root@192.168.1.3 Host key fingerprint is b6:dc:cb:ff:33:83:aa:03:56:94:0c:bc:7f:38:cf:b7 +--[ RSA 2048]----+ | ..o . | | . + | | o | | . . | | oS. | | oo+o. | | . .o=. . | | ..o.o + | | .o++Eo.+ | +-----------------+ root@192.168.1.3's password: Linux piper 2.6.26-2-xen-686 #1 SMP Mon Jun 21 10:37:05 UTC 2010 i686

Filed Under: Bash, Linux, Networking

Star Wars anthem – pc speaker

August 10, 2010 by Igor Drobot 2 Comments


Really imperial march through the motherboard speaker:

1
aptitude update ; aptitude install beep

aptitude update ; aptitude install beep

And now execute this fun:

1
beep -l 350 -f 392 -D 100 --new -l 350 -f 392 -D 100 --new -l 350 -f 392 -D 100 --new -l 250 -f 311.1 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 350 -f 392 -D 100 --new -l 250 -f 311.1 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 700 -f 392 -D 100 --new -l 350 -f 587.32 -D 100 --new -l 350 -f 587.32 -D 100 --new -l 350 -f 587.32 -D 100 --new -l 250 -f 622.26 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 350 -f 369.99 -D 100 --new -l 250 -f 311.1 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 700 -f 392 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 392 -D 100 --new -l 25 -f 392 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 739.98 -D 100 --new -l 25 -f 698.46 -D 100 --new -l 25 -f 659.26 -D 100 --new -l 25 -f 622.26 -D 100 --new -l 50 -f 659.26 -D 400 --new -l 25 -f 415.3 -D 200 --new -l 350 -f 554.36 -D 100 --new -l 250 -f 523.25 -D 100 --new -l 25 -f 493.88 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 25 -f 440 -D 100 --new -l 50 -f 466.16 -D 400 --new -l 25 -f 311.13 -D 200 --new -l 350 -f 369.99 -D 100 --new -l 250 -f 311.13 -D 100 --new -l 25 -f 392 -D 100 --new -l 350 -f 466.16 -D 100 --new -l 250 -f 392 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 700 -f 587.32 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 392 -D 100 --new -l 25 -f 392 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 739.98 -D 100 --new -l 25 -f 698.46 -D 100 --new -l 25 -f 659.26 -D 100 --new -l 25 -f 622.26 -D 100 --new -l 50 -f 659.26 -D 400 --new -l 25 -f 415.3 -D 200 --new -l 350 -f 554.36 -D 100 --new -l 250 -f 523.25 -D 100 --new -l 25 -f 493.88 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 25 -f 440 -D 100 --new -l 50 -f 466.16 -D 400 --new -l 25 -f 311.13 -D 200 --new -l 350 -f 392 -D 100 --new -l 250 -f 311.13 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 300 -f 392.00 -D 150 --new -l 250 -f 311.13 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 700 -f 392

beep -l 350 -f 392 -D 100 --new -l 350 -f 392 -D 100 --new -l 350 -f 392 -D 100 --new -l 250 -f 311.1 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 350 -f 392 -D 100 --new -l 250 -f 311.1 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 700 -f 392 -D 100 --new -l 350 -f 587.32 -D 100 --new -l 350 -f 587.32 -D 100 --new -l 350 -f 587.32 -D 100 --new -l 250 -f 622.26 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 350 -f 369.99 -D 100 --new -l 250 -f 311.1 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 700 -f 392 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 392 -D 100 --new -l 25 -f 392 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 739.98 -D 100 --new -l 25 -f 698.46 -D 100 --new -l 25 -f 659.26 -D 100 --new -l 25 -f 622.26 -D 100 --new -l 50 -f 659.26 -D 400 --new -l 25 -f 415.3 -D 200 --new -l 350 -f 554.36 -D 100 --new -l 250 -f 523.25 -D 100 --new -l 25 -f 493.88 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 25 -f 440 -D 100 --new -l 50 -f 466.16 -D 400 --new -l 25 -f 311.13 -D 200 --new -l 350 -f 369.99 -D 100 --new -l 250 -f 311.13 -D 100 --new -l 25 -f 392 -D 100 --new -l 350 -f 466.16 -D 100 --new -l 250 -f 392 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 700 -f 587.32 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 392 -D 100 --new -l 25 -f 392 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 739.98 -D 100 --new -l 25 -f 698.46 -D 100 --new -l 25 -f 659.26 -D 100 --new -l 25 -f 622.26 -D 100 --new -l 50 -f 659.26 -D 400 --new -l 25 -f 415.3 -D 200 --new -l 350 -f 554.36 -D 100 --new -l 250 -f 523.25 -D 100 --new -l 25 -f 493.88 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 25 -f 440 -D 100 --new -l 50 -f 466.16 -D 400 --new -l 25 -f 311.13 -D 200 --new -l 350 -f 392 -D 100 --new -l 250 -f 311.13 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 300 -f 392.00 -D 150 --new -l 250 -f 311.13 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 700 -f 392

Filed Under: Bash, Debian, Fun, Linux, Ubuntu Tagged With: beep, Fun, star wars

  • « Previous Page
  • 1
  • …
  • 8
  • 9
  • 10
  • 11
  • Next Page »
Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok