Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
|
becki:linux:commands [2014-05-11 18:03] becki |
becki:linux:commands [2024-09-09 09:23] (aktuell) becki [VFAT Renaming] |
||
|---|---|---|---|
| Zeile 44: | Zeile 44: | ||
| zeigt (& setzt) die Hardwarezeit | zeigt (& setzt) die Hardwarezeit | ||
| Achtung systohc ändert /etc/adjtime | Achtung systohc ändert /etc/adjtime | ||
| + | |||
| + | ===== Users and Groups == | ||
| + | |||
| + | See [[Users and Groups]] | ||
| ===== Manuals == | ===== Manuals == | ||
| Zeile 155: | Zeile 159: | ||
| ==== Concat pdf files == | ==== Concat pdf files == | ||
| + | |||
| + | ''pdfunite'' from the poppler lib | ||
| + | |||
| + | Alternatives: ''pdfconcat'' and ''gs'': | ||
| gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=GoCourse.pdf GoCourseDay1.pdf GoCourseDay2.pdf GoCourseDay3.pdf | gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=GoCourse.pdf GoCourseDay1.pdf GoCourseDay2.pdf GoCourseDay3.pdf | ||
| | | ||
| - | [[http://www.linux.com/news/software/applications/8229-putting-together-pdf-files|Source]] | + | [[http://www.linux.com/news/software/applications/8229-putting-together-pdf-files|gs Source]] |
| ==== Other == | ==== Other == | ||
| Zeile 298: | Zeile 306: | ||
| VFAT is the default file system on off the shelf memory sticks, PC- and SD-cards. Use it if you need compatibility with M$-Windows. | VFAT is the default file system on off the shelf memory sticks, PC- and SD-cards. Use it if you need compatibility with M$-Windows. | ||
| - | ''mkfs.vfat -v [-c] [-n volume-name] /dev/hde1'' - Formatiert eine PCMCIA-Karte mit msdos-FS | + | ''mkfs.vfat -v [-c] [-n volume-name] /dev/hde1'' - Formats a PCMCIA-card or sdcard or USB-stick with msdos-FS |
| - | * ''mkfs.vfat'' and ''mkfs.msdos'' are symlinks for ''mkfs.fat'' | + | ''mkdosfs'', ''mkfs.vfat'' and ''mkfs.msdos'' are symlinks for ''mkfs.fat'' |
| - | * ''mkfs.msdos'' was a symlink for ''mkdosfs'' | + | |
| - | Eintrag in fstab für Windoof-Formatierte Sticks: | + | Also |
| + | |||
| + | Entry in ''fstab'' für vfat-formatted sticks - no necessary any more: | ||
| /dev/sda1 /mnt/ums vfat noauto,user 0 0 #or | /dev/sda1 /mnt/ums vfat noauto,user 0 0 #or | ||
| /dev/sda1 /mnt/ums auto noauto,user 0 0 | /dev/sda1 /mnt/ums auto noauto,user 0 0 | ||
| Zeile 309: | Zeile 318: | ||
| An off the shelf memory stick has a file system type ID of 6 (= FAT16). See ''fdisk -l'' | An off the shelf memory stick has a file system type ID of 6 (= FAT16). See ''fdisk -l'' | ||
| + | Also helpful: [[slackmirror>slackware-14.1/usb-and-pxe-installers/README_USB.TXT]] | ||
| ==== VFAT Renaming == | ==== VFAT Renaming == | ||
| - | Use [[man>dosfslabel]] (only uppercase possible) | + | Use [[man>fatlabel]] |
| - | You can rename e.g. a label in lowercase with mtools: | + | Old: You can rename e.g. a label in lowercase with mtools: |
| - Plug USB stick into computer and mount it if necessary | - Plug USB stick into computer and mount it if necessary | ||
| Zeile 326: | Zeile 336: | ||
| Linux file systems like ext3, ext4 and reiserfs are aware of the Linux protections modes (owner, group, etc.). Use it if you want exchange files between two Linus systems. | Linux file systems like ext3, ext4 and reiserfs are aware of the Linux protections modes (owner, group, etc.). Use it if you want exchange files between two Linus systems. | ||
| - | Example formatting for ''/dev/sdb'': | + | Example formatting for ''/dev/sdb1'': |
| - | - Set the file system typ to 83 (= Linux) with ''cfdisk /dev/sdb''.\\ (It may as well work without this step, but setting the right FS ID cannot harm.) | + | - Set the file system typ to 83 (= Linux) with ''cfdisk /dev/sdb1''.\\ (It may as well work without this step, but setting the right FS ID cannot harm.) |
| - | - Format the stick with: ''mkfs.ext3 -L BeckisStick'' /dev/sdb | + | - Format the stick with: ''mkfs.ext3 -L BeckisStick'' /dev/sdb1 |
| + | Sole renaming the disk label is possible with: ''e2label device new-label''. Source: https://linuxconfig.org/how-to-name-label-a-partition-or-volume-on-linux | ||
| ==== Floppies == | ==== Floppies == | ||
| Zeile 375: | Zeile 386: | ||
| ===== Sound == | ===== Sound == | ||
| - | mixer: alsamixer (,rexima, amixer) | + | See [[sound]] |
| - | + | ||
| - | rec -V -c 2 -r 22050 spanisch2.wav | + | |
| - | -V fuer verbose, siehe man sox | + | |
| - | -c fuer 2 Kanaele, | + | |
| - | -r 22050 ist halbe Cd-Abtastrate, ausgetestet, dies führt zu einer nicht zu grossen wav-datei bei vernünftiger Qualitaet | + | |
| - | xmms blur scope hilft beim einstellen des Aufnahmelevels | + | |
| - | Die Aufnahme kommt über igain (rexima) rein (Slack9.0), dies auf 100% setzen und den Lautstärkelevel am Walkman einstellen | + | |
| - | rec verwendet offensichtlich standardmäßig /dev/dsp als device, das es dies bei master11 nicht öffnen kann (Permission denied) | + | |
| - | rec & play gehören zu sox | + | |
| - | + | ||
| - | Aufnehmen mit alsa | + | |
| - | arecord ist wie rec von alsa | + | |
| - | alsamixer | + | |
| - | Die Aufnahme kommt über Line rein. Line auf 100% & Capture auf 40% setzen, beide unmuten & beide mit Spacetaste als Aufnahemquelle auswählen. | + | |
| - | arecord -v -f cd spanish3.wav | + | |
| - | Lautstärkelevel am Walkman voll aufdrehen. | + | |
| - | + | ||
| - | ==== Further Infos == | + | |
| - | + | ||
| - | [[http://tuxradar.com/content/how-it-works-linux-audio-explained|Linux audio explained]], [[http://linux-sound.org|Sound Howto]] | + | |
| ===== Terminal-Emulatoren == | ===== Terminal-Emulatoren == | ||
| Zeile 475: | Zeile 466: | ||
| ===== Rip DVDs == | ===== Rip DVDs == | ||
| - | Get Info about DVD: | + | See [[multimedia]] |
| - | HandBrakeCLI -i /dev/dvd -t 0 2>err.txt | + | |
| - | and look for the longest title. | + | |
| - | + | ||
| - | Rip Example: | + | |
| - | HandBrakeCLI -i /dev/dvd -o movie.mp4 --preset=Normal --loose-anamorphic -L [-a 1[,2]] [-A Deutsch[,English]] [-s 1] [-c 3] | + | |
| - | + | ||
| - | Possibly helpful scripts for: | + | |
| - | * Getting info about a dvd, save it into dvdinfo.txt and display it in your pager | + | |
| - | * Ripping a DVD wit reasonable default settings | + | |
| - | are [[http://188.40.201.137/becki/sources/pack.php?n=sbhandbrake|here]] | + | |
| - | + | ||
| - | [[http://trac.handbrake.fr/wiki/CLIGuide|CLIGuide]], [[http://www.linux.com/feature/114130|Intro]] on Linux.com, [[http://www.linux-user.de/ausgabe/2006/07/074-handbrake/|Intro]] on Linux-User (german) | + | |
| ===== OpenPGP == | ===== OpenPGP == | ||
| - | Abstract: The sender encrypts a file with the public key of the receiver. After sending the receiver decrypts the file with his secret key. Digital Signatures are also possible. Infos from ''man pgp'' or [[http://www.gnupg.org/gph/en/manual.html|Manual]] | + | See [[OpenPGP]] |
| - | + | ||
| - | **Create** a new primary keypair and ''%%~/.gnupg%%'' with ''%%gpg --gen-key%%''. Keep all default values. Specifiy given name, surname, and email adress. Comment can be omitted. | + | |
| - | + | ||
| - | Create a [[http://www.gnupg.org/gph/en/manual.html#REVOCATION|revocation certificate]] with ''%%gpg --output revoke.asc --gen-revoke <mykey>%%'' to declare your public key invalid in case the private key gets lost or exposed. ''mykey'' must be a substring of the user ID which you specified at keypair cration. Copy it eg to a floppy disk and lock it. | + | |
| - | + | ||
| - | Optionally **list** your key(s) with ''%%gpg --list-keys%%'' | + | |
| - | + | ||
| - | **Export** a public key (create a texfile of your public key) with ''%%gpg --armor --export <mykey> > myFullName.asc%%'' | + | |
| - | + | ||
| - | **Import** a foreign public key by issuing ''%%pgp --import harryHirsch.asc%%''. Check with ''%%gpg --list-keys%%''. | + | |
| - | + | ||
| - | **Validate** the key with ''%%gpg --edit-key Harry%%'' -> ''fpr'' -> Compare fingerprint by word of mouth -> ''sign'' -> ''check'' -> ''quit'' -> save:y | + | |
| - | + | ||
| - | **Encryption** of a file is done by ''%%gpg --encrypt file%%'' and **decrpytion** by ''%%gpg --decrypt file.gpg > file%%'' | + | |
| - | + | ||
| - | **Delete** a key with ''%%gpg --delete Harry%%'' | + | |
| - | + | ||
| - | ''kgpg'' is a graphical frontent on slackware. | + | |
| ===== Networking == | ===== Networking == | ||
| ==== nmap == | ==== nmap == | ||
| - | Port scanner and network exploration tool. See [[http://www.linux.com/learn/tutorials/290879-beginners-guide-to-nmap|Beginners guide to nmap]] -- [[http://olex.openlogic.com/wazi/2011/nmap-network-probing-cheatsheet/|Nmap Network Probing Cheatsheet]] -- [[man>nmap|Manpage]] | + | Port scanner and network exploration tool. See [[http://www.linux.com/learn/tutorials/290879-beginners-guide-to-nmap|Beginners guide to nmap]] -- [[http://olex.openlogic.com/wazi/2011/nmap-network-probing-cheatsheet/|Nmap Network Probing Cheatsheet]] -- [[man>nmap|Manpage]] -- [[http://www.unixmen.com/10-practical-examples-linux-nmap-command/|10 Practical Examples Of Linux ‘nmap’ Command]] |
| | -A | Enables OS detection (-O) and Version detection (-sV), Script scanning and Traceroute | | | -A | Enables OS detection (-O) and Version detection (-sV), Script scanning and Traceroute | | ||
| Zeile 527: | Zeile 488: | ||
| [[man>netstat]] displays a list of open sockets (and more) | [[man>netstat]] displays a list of open sockets (and more) | ||
| + | ''ss'' seems to be a newer alternative to nestat. See | ||
| + | https://unix.stackexchange.com/questions/106561/finding-the-pid-of-the-process-using-a-specific-port#106562 | ||
| ==== nc (netcat) == | ==== nc (netcat) == | ||
| Zeile 629: | Zeile 592: | ||
| === Usage == | === Usage == | ||
| - | Download a file: | + | Download a single file: |
| - | + | ||
| - | curl http://www.gnu.org/favicon.ico > favicon.ico | + | |
| + | <code bash> | ||
| + | curl -O http://www.gnu.org/favicon.ico | ||
| + | # or: | ||
| + | curl http://www.gnu.org/favicon.ico > favicon.ico | ||
| + | </code> | ||
| ==== wget == | ==== wget == | ||
| Zeile 686: | Zeile 652: | ||
| traceroute - Routen von Paketen über TCP/IP-Netzwerk anzeigen | traceroute - Routen von Paketen über TCP/IP-Netzwerk anzeigen | ||
| - | ip - vereinigt ifconfig & route (LinuxUser 04/04 S.38) | ||
| ifconfig | ifconfig | ||
| route [-n] | route [-n] | ||
| + | ip - vereinigt ifconfig & route ([[http://www.linux-community.de/Internal/Artikel/Print-Artikel/LinuxUser/2004/04/1x1-der-Netzwerktools|LinuxUser 04/04 S.38]] and http://www.tty1.net/blog/2010/ifconfig-ip-comparison_en.html) | ||
| + | |||
| + | brctl delbr <networkinterface> - remove an network interface (''ifconfig <networkinterface> down'' only disables it) | ||
| netstat [-i] - Infos zum Netzwerk | netstat [-i] - Infos zum Netzwerk | ||
| Zeile 823: | Zeile 791: | ||
| ===== unsorted == | ===== unsorted == | ||
| + | |||
| + | xclip: read text into X selection (clipboard) from standard input | ||
| gnome-session - Start the window manager | gnome-session - Start the window manager | ||
| Zeile 891: | Zeile 861: | ||
| dialog, xmessage, zenity (gdialog), kdialog | dialog, xmessage, zenity (gdialog), kdialog | ||
| display dialog boxes from shell scripts http://developer.kde.org/documentation/tutorials/kdialog/t1.html | display dialog boxes from shell scripts http://developer.kde.org/documentation/tutorials/kdialog/t1.html | ||
| - | |||
| - | usermod - Modify a user account (aus CVS-RCS-Howto) | ||
| - | chfn - change user name and information | ||
| - | adduser - Interactive front end to /usr/sbin/useradd for SW (Shellscript) | ||
| - | userdel - na was wohl? (aus SW-Book) | ||
| - | groupadd - Create a new group (aus SW-Book) | ||
| - | groupdel (aus SW-Book) | ||
| dmesg - Bootmessages ausgeben | dmesg - Bootmessages ausgeben | ||