Shell Commands & More

Total Page:16

File Type:pdf, Size:1020Kb

Shell Commands & More Shell Commands & More Uwe Schimanski Seab@er Software Goch, den 3. Februar 2020 Copyright c 2018 Uwe Schimanski Published by Publisher seabaer-ag.de Licensed under the Creative Commons Attribution-NonCommercial 3.0 Unported License (the “License”). You may not use this file except in compliance with the License. You may obtain a copy of the License at http://creativecommons.org/licenses/by-nc/3.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “as is” basis, without warranties or conditions of any kind, either express or implied. See the License for the specific language governing permissions and limitations under the License. First printing, May 2018 Inhaltsverzeichnis Vorwort xiii 1 Konfiguration 1 1.1 Bash . .1 1.2 Shell Gedächnis . .2 1.3 Befehle mehrzeilig . .2 1.4 Tastenzuordnung . .3 1.5 Tastaturfunktionen . .3 1.6 Prompt . .4 1.6.1 Bash . .4 1.6.2 Zsh . .7 1.7 VI Editor . .8 1.7.1 Konfiguration . .8 1.7.2 Starten . .9 1.7.3 Befehle . .9 1.8 Sonderzeichen . 13 2 Befehle 15 2.1 Ordner / Verzeichnisse . 15 2.1.1 Anlegen . 15 2.1.2 Löschen . 15 2.2 Berechtigungen . 16 2.2.1 Chmod, Chown und Chgrp . 16 2.2.2 Chattr . 16 2.2.3 ACL . 17 2.2.4 Sticky-Bit . 17 2.3 LSOF - Geöffnete Dateien anzeigen . 18 2.3.1 Optionen . 18 2.3.2 Was hat ein Programm offen . 18 2.3.3 Portzugriff . 19 2.3.4 Verzeichniszugriff . 19 2.3.5 Benutzerzugriff . 19 2.3.6 Prozesszugriff . 20 2.4 Dateien . 20 2.4.1 Suchen . 20 2.4.2 Löschen . 21 2.4.3 Vergleichen . 21 2.4.4 Datei patchen . 21 2.4.5 Nur neuere Dateien kopieren . 21 2.4.6 Anzahl Dateien . 21 2.4.7 Dateien anlegen / Datum aktualisieren . 22 2.4.8 Dateien nach Größe / Zeit anzeigen . 22 2.4.9 Status Informationen . 22 i ii INHALTSVERZEICHNIS 2.4.10 Unveränderliche Dateien . 23 2.4.11 Dateien konvertieren . 24 2.4.12 Dateianfang anzeigen . 24 2.4.13 Dateiinhalt ausgeben . 24 2.5 Programme . 25 2.5.1 Im Hintergrund ausführen . 25 2.5.2 Ausgabe des Programmpfads . 25 2.5.3 Programme in einer Sandbox ausführen . 25 2.6 Mails . 26 2.6.1 Konfiguration . 26 2.6.2 Verschicken . 26 2.7 Grep . 27 2.7.1 In Farbe . 27 2.7.2 Klein- / Großschreibung . 27 2.7.3 Exakte Suche . 27 2.7.4 Mehrere Wörter Suchen . 27 2.7.5 Zeilen Nummer . 28 2.7.6 Anzahl Übereinstimmungen . 28 2.7.7 Alles ausgeben . 28 2.7.8 Ausgabe Datei . 28 2.8 Links . 28 2.8.1 Anlegen . 28 2.8.2 Anzeigen . 29 2.8.3 Löschen . 29 2.9 Größe und Position der Console . 29 2.10 Suchen & Ersetzten . 30 2.10.1 SED . 30 2.10.2 TR . 34 2.11 Spaltenweise Operationen . 35 2.11.1 AWK . 35 2.11.2 CUT . 35 2.12 Klammerexpandierung . 36 2.13 Ausgabe sortieren . 37 2.14 Rechnen . 37 2.15 Umgebunsvariablen anzeigen . 37 2.16 Prüfsummen . 37 2.17 Programmschleife . 37 2.18 Merge PDF Dateien . 38 2.19 Verzeichnisstruktur mit Tree . 38 2.20 Screenshot erstellen . 38 2.21 Convert Character Set . 38 2.22 Curl . 39 3 Dateisystem 41 3.1 Logical Volume (LVM) Informationen . 41 3.2 Festplattenplatz . 41 3.3 Dateisystem konvertieren . 42 3.3.1 EXT2 nach EXT3 . 42 3.4 Festplatten überwachen (SMART) . ..
Recommended publications
  • Lightweight Distros on Test
    GROUP TEST LIGHTWEIGHT DISTROS LIGHTWEIGHT DISTROS GROUP TEST Mayank Sharma is on the lookout for distros tailor made to infuse life into his ageing computers. On Test Lightweight distros here has always been a some text editing, and watch some Linux Lite demand for lightweight videos. These users don’t need URL www.linuxliteos.com Talternatives both for the latest multi-core machines VERSION 2.0 individual apps and for complete loaded with several gigabytes of DESKTOP Xfce distributions. But the recent advent RAM or even a dedicated graphics Does the second version of the distro of feature-rich resource-hungry card. However, chances are their does enough to justify its title? software has reinvigorated efforts hardware isn’t supported by the to put those old, otherwise obsolete latest kernel, which keeps dropping WattOS machines to good use. support for older hardware that is URL www.planetwatt.com For a long time the primary no longer in vogue, such as dial-up VERSION R8 migrators to Linux were people modems. Back in 2012, support DESKTOP LXDE, Mate, Openbox who had fallen prey to the easily for the i386 chip was dropped from Has switching the base distro from exploitable nature of proprietary the kernel and some distros, like Ubuntu to Debian made any difference? operating systems. Of late though CentOS, have gone one step ahead we’re getting a whole new set of and dropped support for the 32-bit SparkyLinux users who come along with their architecture entirely. healthy and functional computers URL www.sparkylinux.org that just can’t power the newer VERSION 3.5 New life DESKTOP LXDE, Mate, Xfce and others release of Windows.
    [Show full text]
  • FLOSS Final Report – Part 3 Free/Libre Open Source Software: Survey and Study
    FLOSS Final Report – Part 3 Free/Libre Open Source Software: Survey and Study Basics of Open Source Software Markets and Business Models Berlin, July 2002 3 BERLECON RESEARCH GmbH Oranienburger Str. 32 10117 Berlin Tel.: +49 30 285296-0 Fax: +49 30 285296-29 Web: http://www.berlecon.de Email: [email protected] Acknowledgements: This work was prepared by Dorit Spiller and Thorsten Wichmann from Berlecon Research. It is part of the final report for the project „FLOSS – Free/Libre Open Source Software: Survey and Study“, which was financed under the European Com- mission‘s IST programme, key action 4 as accompanying measure (IST-2000-4.1.1). Disclaimer: The views expressed in this report are those of the authors and do not necessarily re- flect those of the European Commission. Neither the European Commission nor any person acting on behalf of the Commission is responsible for the use that might be made of the following information. Nothing in this report implies or expresses a warranty of any kind. Results from this report should only be used as guidelines as part of an overall strategy. For detailed ad- vice on corporate planning, business processes and management, technology integra- tion and legal or tax issues, the services of a professional should be obtained. Names and trademarks mentioned in the report are the property of their respective owners. © 2002 by Berlecon Research GmbH. 4 V 1.1 - 020905 © 2002 by Berlecon Research GmbH. 5 Table of contents 1 Introduction....................................................................................................... 9 2 Software and the Open Source phenomenon.................................................... 11 2.1 The Open Source phenomenon .................................................................
    [Show full text]
  • Monitoring Your System with Conky
    C@ELOLJ<I Conky System Monitor Dfe`kfi`e^pflijpjk\dn`k_:febp This light-weight system monitor keeps you informed about your com- At this point you will see a number of options that are enabled or disabled by puter’s performance. BY JAN RÄHM default. For example, if you use the Audacious media player, you will want ystem monitoring utilities help and provides information on a media to enable matching support in Conky by users keep track of performance player if a player happens to be active. specifying --enable-audacious=yes. If Jmetrics, and the Linux environ- To configure what you want the system your computer does not have sensors ment offers a variety of useful monitor- monitor to show and how you want it that check the hard disk temperature, ing utilities. One of the simplest and eas- shown to you is quite simple. you might want to disable the corre- iest of these monitoring tools is a desk- sponding feature, enabled by default, by top gem called Conky [1]. @ejkXccXk`fe Conky’s history goes back more than Conky is available from the repositories Listing 1: conky.ds four years. At the time, the project was of most, but not all, popular distribu- (if launched under the name Torsmo. After tions. Unless your choice of distribution (is (window_class) "Conky") just one year, Conky forked from Tor- does not come with Conky or – and this (begin smo. The project founders were inspired is more likely – you want to do some- (pin) by the Canadian TV show “Trailer Park thing special with the tool, you will not (undecorate) Boys” and chose one if its protagonists need to build the system monitor your- (wintype "dock") as the project name.
    [Show full text]
  • The Bioinformatics Playground
    Gearing for bioinformatics Gearing for bioinformatics Bela Tiwari and Dawn Field explore the tools and facilities that ioinformatics’ is a buzz word that is Projects with enough funding are able to hire users will depend on the system, how they will becoming increasingly audible in the dedicated system administrators to provide access it, etc. Live CD or DVD distributions may can be used by the budding open source bioinformatician ‘BLinux world. Fast, economical, sustainable bioinformatics computing systems, be good for an individual and for demonstration flexible, and extensible computing power is but many of us are not that lucky and have to purposes, but they are probably not the right making Linux increasingly attractive to scientists go it alone. choice for the provision of tools to a whole in many areas of research, including biology. To add to the challenge, much bioinformatics department. More generally, the open source movement has software is written by academics, and while greatly benefited biological research; the most there are some very good, well tested packages LIVE DISTRIBUTIONS publicised project being the publicly funded out there, there are also many that were Live Linux distributions are a relatively new effort to sequence and make freely available the intended to answer a particular question, on a phenomenon and offer some big advantages. human genome. Less well publicised is the huge particular machine, for a particular group. Such You don’t have to install anything to run them. amount of biological data that can be freely packages were often not built with portability, Just slot the CD or DVD into the drive and boot accessed.
    [Show full text]
  • Redhawk Linux User's Guide
    Linux® User’s Guide 0898004-510 May 2006 Copyright 2006 by Concurrent Computer Corporation. All rights reserved. This publication or any part thereof is intended for use with Concurrent products by Concurrent personnel, customers, and end–users. It may not be reproduced in any form without the written permission of the publisher. The information contained in this document is believed to be correct at the time of publication. It is subject to change without notice. Concurrent makes no warranties, expressed or implied, concerning the information contained in this document. To report an error or comment on a specific portion of the manual, photocopy the page in question and mark the correction or comment on the copy. Mail the copy (and any additional comments) to Concurrent Computer Corporation, 2881 Gateway Drive, Pompano Beach, Florida, 33069. Mark the envelope “Attention: Publications Department.” This publication may not be reproduced for any other reason in any form without written permission of the publisher. RedHawk, iHawk, NightStar, NightTrace, NightSim, NightProbe and NightView are trademarks of Concurrent Computer Corporation. Linux is used pursuant to a sublicense from the Linux Mark Institute. Red Hat is a registered trademark of Red Hat, Inc. POSIX is a registered trademark of the Institute of Electrical and Electronics Engineers, Inc. AMD Opteron and AMD64 are trademarks of Advanced Micro Devices, Inc. The X Window System is a trademark of The Open Group. OSF/Motif is a registered trademark of the Open Software Foundation, Inc. Ethernet is a trademark of the Xerox Corporation. NFS is a trademark of Sun Microsystems, Inc. HyperTransport is a licensed trademark of the HyperTransport Technology Consortium.
    [Show full text]
  • Ubuntu: Unleashed 2017 Edition
    Matthew Helmke with Andrew Hudson and Paul Hudson Ubuntu UNLEASHED 2017 Edition 800 East 96th Street, Indianapolis, Indiana 46240 USA Ubuntu Unleashed 2017 Edition Editor-in-Chief Copyright © 2017 by Pearson Education, Inc. Mark Taub All rights reserved. Printed in the United States of America. This publication is protected Acquisitions Editor by copyright, and permission must be obtained from the publisher prior to any prohib- Debra Williams ited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information Cauley regarding permissions, request forms and the appropriate contacts within the Pearson Managing Editor Education Global Rights & Permissions Department, please visit www.pearsoned.com/ permissions/. Sandra Schroeder Many of the designations used by manufacturers and sellers to distinguish their Project Editor products are claimed as trademarks. Where those designations appear in this book, and Lori Lyons the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. Production Manager The author and publisher have taken care in the preparation of this book, but make Dhayanidhi no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in Proofreader connection with or arising out of the use of the information or programs contained Sasirekha herein. Technical Editor For information about buying this title in bulk quantities, or for special sales opportunities (which may include electronic versions; custom cover designs; and content José Antonio Rey particular to your business, training goals, marketing focus, or branding interests), Editorial Assistant please contact our corporate sales department at [email protected] or (800) 382-3419.
    [Show full text]
  • Lin1 3.2.0-4-Amd64 #1 SMP Debian 3.2.60-1+Deb7u3 X86 64 GNU/Linux :~$ Uname -R 3.2.0-4-Amd64 Kernel Verwendet Module Z.B
    Vorbereitung auf LPIC-1 Georg Schönberger XORTEX eBusiness GmbH Version 30. März 2016 Kurz über mich... Studium Computer- und Mediensicherheit Gitter-basierende Kryptosysteme Studium Sichere Informationssysteme Auslagerung der IPSec- Verschlüsselung auf Grafikkarten Jobs F&E in Hagenberg Thomas-Krenn.AG XORTEX Autor (IT-Admin, LinuxUser) 2 LPIC-1 LVA Meine Tätigkeiten Betreuung Server-Infrastruktur Ceph Cluster Ansible Betreuung DRBD-Cluster mit LXC-Container Entwicklung von Monitoring-Plugins Entwicklung von Performance-Tests http://git.thomas-krenn.com Verbesserung der internen/externen Sicherheit Zertifizierungen Network+, Server+, Linux Essentials, LPIC-1, LPIC-2 3 LPIC-1 LVA Die LVA Vorbereitung auf LPIC-1 Version 4 Exam 101 und Exam 102 Themen LPIC-1 Objectives V4 (wiki.lpi.org) Guides Achtung – Version 3: Learn Linux, 101: A roadmap for LPIC-1 (ibm.com) GNU/Linux Administration Manuals (nongnu.org) Bücher LPIC-1: Sicher zur erfolgreichen Linux-Zertifizierung (Harald Maaßen) Achtung – Version 3: LPIC-1. Vorbereitung auf die Prüfung des Linux Professional Institute (Peer Heinlein) 4 LPIC-1 LVA Objectives: Exam 101 5 LPIC-1 LVA Topic 101: System Architecture Peripherie Module Virtuelle Dateisysteme (sysfs, procfs) Boot-Vorgang Runlevel 6 LPIC-1 LVA 101.1 Determine and configure hardware settings Kernel Module /proc /sys 7 LPIC-1 LVA Kernel Module Welchen Kernel verwende ich gerade? :~$ uname -a Linux lin1 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux :~$ uname -r 3.2.0-4-amd64 Kernel verwendet Module Z.B. als ladbare
    [Show full text]
  • COMPLETE GUIDE to INSTALL UBUNTU LINUX with OPENBOX Ubuntuopenbox.Com/Udemy
    UbuntuOpenbox.com Copyright © 2016 by Dat H. Nguyen UDEMY COURSE MATERIAL COMPLETE GUIDE TO INSTALL UBUNTU LINUX WITH OPENBOX UbuntuOpenbox.com/udemy Section 3 – Install Ubuntu Operating System 1. Repositories: A repository is a server storing packages that are suitable to be installed right away (packages as well as all of their dependencies) /etc/apt/source.list file will have a list of repository addresses. *PPA: A Personal Package Archives (PPA) is a repository maintained by an individual or an independent group; as oppose to the official repository maintained by Ubuntu. 2. Update apt information (from source.list file) sudo apt-get update It will go to the addresses listed in the /apt/etc/source.list file and update the information about what are on there (which packages are on there) and what have been changed (what the current packages’ versions are). You need to execute this command whenever you want to install any package. 3. Install packages sudo apt-get install [packages' name] For example: sudo apt-get install firefox openbox will install both firefox and openbox at the same time. 4. Remove packages sudo apt-get remove firefox * remove packages and all their configuration file. sudo apt-get remove --purge firefox 5. nano to edit text file sudo nano /directory/to/text/file Navigate through the text file using up/down/left/right keys. * shortcut keys: “Ctrl + X” to exit nano, “Y” to save and “N” to abort the saving. Section 4 – Install Openbox And Configure It Last updated in February, 2016 1 of 7 UbuntuOpenbox.com Copyright © 2016 by Dat H.
    [Show full text]
  • MX-19.2 Users Manual
    MX-19.2 Users Manual v. 20200801 manual AT mxlinux DOT org Ctrl-F = Search this Manual Ctrl+Home = Return to top Table of Contents 1 Introduction...................................................................................................................................4 1.1 About MX Linux................................................................................................................4 1.2 About this Manual..............................................................................................................4 1.3 System requirements..........................................................................................................5 1.4 Support and EOL................................................................................................................6 1.5 Bugs, issues and requests...................................................................................................6 1.6 Migration............................................................................................................................7 1.7 Our positions......................................................................................................................8 1.8 Notes for Translators.............................................................................................................8 2 Installation...................................................................................................................................10 2.1 Introduction......................................................................................................................10
    [Show full text]
  • Webserver WEBSER  Shell-Zugriff Via Webbrowser Debian 6.0 S
    COMMUNITY-EDITION Frei kopieren und beliebig weiter verteilen ! 04.2011 04.2011 APACHE-ALTERNATIVEN: WEBSITES AUFSETZEN UND PFLEGEN VER WEBSERVER WEBSER Shell-Zugriff via Webbrowser Debian 6.0 S. 6 Live- und Install-DVDs So verwalten Sie mit PHP Shell und Shell in a Box für 32- und 64-Bit-PCs den Webserver über die Kommandozeile S. 33, DVD Analyse-Tools für die Website Server-Logs grafisch aufbereiten und Benutzerzugriffe detailliert auswerten mit Webalizer und Piwik S. 38, 42, DVD Fünf Apache-Alternativen für alle Fälle S. 20, 28, DVD Profi-Server Nginx, hochsicherer Hiawatha, Allrounder Lighttpd, Minimalist Thttpd, schneller Einstieg mit Monkey HTTP Daemon MoonOS 4 S. 12 Schicke Mac-Optik für Ubuntu „Maverick“ Laptop-Schnäppchen Aspire 5253 Acers neuer 15,6-Zöller auf AMD-Fusion-Basis mit satter Grafik-Leistung und langer Laufzeit S. 80 Texterkennung in Platzfresser von Profi-Qualität S. 48, DVD der Platte putzen S. 70 Unity 2010.2 S. 8 Cuneiform: multilinguale OCR Dateileichen und Altlasten Maßgeschneiderte mit intuitiver Oberfläche aufspüren mit JDiskReport Distro auf Knopfdruck MythTV-Export Geballtes Wissen auf Knopfdruck S. 66 stets zur Hand S. 82, DVD Aufnahmen unkompliziert Goldendict vereint On- und wandeln, streamen, brennen Offline-Lexika in einer GUI ATI FIREPRO 3D • GOLDENDICT LOUT LUCIDOR MYTHTV OCR ATI 4 196067 008502 04 www.linux-user.de EDITORIAL Klare Ansage Sehr geehrte Leserinnen und Leser, im Vorfeld von Ubuntu 11.04 Wohlgemerkt: Die MIT-Lizenz des statt Lizenzgebühren zu verlan- sorgte Canonical immer wieder für Banshee-Projekts hätte jegliche gen. Diesem Geschäftsmodell fol- Schlagzeilen – zuletzt im Zusam- Änderungen auch ganz ohne Nach- gend, werde man grundsätzlich wo menhang mit der Ablösung des frage erlaubt, formaljuristisch war immer möglich aus der Software bisherigen Mediaplayers Rhythm- Canonicals Ansinnen völlig in der freien Upstream-Projekte Ge- box durch Banshee: Der nämlich Ordnung.
    [Show full text]
  • Pipenightdreams Osgcal-Doc Mumudvb Mpg123-Alsa Tbb
    pipenightdreams osgcal-doc mumudvb mpg123-alsa tbb-examples libgammu4-dbg gcc-4.1-doc snort-rules-default davical cutmp3 libevolution5.0-cil aspell-am python-gobject-doc openoffice.org-l10n-mn libc6-xen xserver-xorg trophy-data t38modem pioneers-console libnb-platform10-java libgtkglext1-ruby libboost-wave1.39-dev drgenius bfbtester libchromexvmcpro1 isdnutils-xtools ubuntuone-client openoffice.org2-math openoffice.org-l10n-lt lsb-cxx-ia32 kdeartwork-emoticons-kde4 wmpuzzle trafshow python-plplot lx-gdb link-monitor-applet libscm-dev liblog-agent-logger-perl libccrtp-doc libclass-throwable-perl kde-i18n-csb jack-jconv hamradio-menus coinor-libvol-doc msx-emulator bitbake nabi language-pack-gnome-zh libpaperg popularity-contest xracer-tools xfont-nexus opendrim-lmp-baseserver libvorbisfile-ruby liblinebreak-doc libgfcui-2.0-0c2a-dbg libblacs-mpi-dev dict-freedict-spa-eng blender-ogrexml aspell-da x11-apps openoffice.org-l10n-lv openoffice.org-l10n-nl pnmtopng libodbcinstq1 libhsqldb-java-doc libmono-addins-gui0.2-cil sg3-utils linux-backports-modules-alsa-2.6.31-19-generic yorick-yeti-gsl python-pymssql plasma-widget-cpuload mcpp gpsim-lcd cl-csv libhtml-clean-perl asterisk-dbg apt-dater-dbg libgnome-mag1-dev language-pack-gnome-yo python-crypto svn-autoreleasedeb sugar-terminal-activity mii-diag maria-doc libplexus-component-api-java-doc libhugs-hgl-bundled libchipcard-libgwenhywfar47-plugins libghc6-random-dev freefem3d ezmlm cakephp-scripts aspell-ar ara-byte not+sparc openoffice.org-l10n-nn linux-backports-modules-karmic-generic-pae
    [Show full text]
  • Coase's Penguin, Or, Linux and the Nature of the Firm
    Articles Coase's Penguin, or, Linux and The Nature of the Firm Yochai Benklert CONTENTS INTRODUCTION........... ......... ........ .................... 371 I. PEER PRODUCTIONALL AROUND ...................................................... 381 A. Content......................................................................................... 384 B. Relevance/Accreditation...........................................................390 C. Value-AddedDistribution ............................................................396 D. Summ ary ......................................................................................399 t Professorof Law, New York UniversitySchool of Law. Researchfor this Article was partlysupported by a grantfrom the FilomenD'Agostino and Max E. GreenbergResearch Fund at the New York UniversitySchool of Law. I owe thanksto many for commentson this and earlierdrafts, including: Bruce Ackerman, Ed Baker,Elazar Barkan, Jamie Boyle, Dan Burk,Ben Damstedt,Bob Ellickson,Terry Fisher, Natalie Jeremijenko,David Johnson,Dan Kahan,Niva Elkin Koren,Tara Lemmey, Larry Lessig, Doug Lichtman,Jerry Mashaw, Eben Moglen, Mark Nadel,Helen Nissenbaum, George Priest, Peggy Radin,Carol Rose, ChuckSabel, Alan Schwartz, Clay Shirky,Richard Stallman, and Kenji Yoshino.I owe special thanksto Steve Snyderfor his invaluableresearch assistance on the peerproduction enterprises described here. I have gotten many questionsabout the "Coase'sPenguin" portion of the title. It turnsout that the geek culturethat easily recognizes"Coase" doesn't recognizethe
    [Show full text]