Linux Command Line Befehle: Unterschied zwischen den Versionen
Gego (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
Gego (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
Zeile 58: | Zeile 58: | ||
<code>-Q</code> Quoted output | <code>-Q</code> Quoted output | ||
==Search Files== | |||
<code>grep pattern files </code> Search for pattern in files | |||
<code>grep -i </code> Case insensitive search | |||
<code>grep -r </code> Recursive search | |||
<code>grep -v </code> Inverted search | |||
<code>grep -o </code> Show matched part of file only | |||
<code>find /dir/ -name name* </code> Find files starting with name in dir | |||
<code>find /dir/ -user name </code> Find files owned by name in dir | |||
<code>find /dir/ -mmin num </code> Find files modifed less than num minutes ago in dir | |||
<code>whereis command </code> Find binary / source / manual for command | |||
<code>locate file </code> Find file (quick search of system index) | |||
Version vom 28. September 2022, 18:30 Uhr
INFORMATION
Details: Siehe Volltext. Sprache der Inhalte: Deutsch.
- Linux Command Line FAQ
- ELib Team
- 2022 2022
- Siehe eLib.at Lizenz, so nicht extra anders angegeben.
- Graues Werk
- Onlineversion - Archivversion
Zitierhilfe: Zitiere diese Inhalte in verschiedenen Zitierstilen. Archivkopien aller Inhalte finden sich auch im großartigen Internet Archive (Spenden).
QUERVERBINDUNGEN
Verbindungen mit Personen, Orten, Dingen und Ereignissen finden sich unter Themen und Schwerpunkte.
TAGS & KATEGORIEN
Linux Command Line Befehle
System Care
sudo apt-get update
Update List of Packages
sudo apt-get upgrade
Upgrade OS and packages
Directory Operations
pwd
Show current directory
mkdir dir
Make directory dir
cd dir
Change directory to dir
cd ..
Go up a directory
ls
List files
ls Options
-a
Show all (including hidden)
-R
Recursive list
-r
Reverse order
-t
Sort by last modified
-S
Sort by file size
-l
Long listing format
-1
One file per line
-m
Comma-separated output
-Q
Quoted output
Search Files
grep pattern files
Search for pattern in files
grep -i
Case insensitive search
grep -r
Recursive search
grep -v
Inverted search
grep -o
Show matched part of file only
find /dir/ -name name*
Find files starting with name in dir
find /dir/ -user name
Find files owned by name in dir
find /dir/ -mmin num
Find files modifed less than num minutes ago in dir
whereis command
Find binary / source / manual for command
locate file
Find file (quick search of system index)
Bash Commands
uname -a
Show system and kernel
head -n1 /etc/issue
Show distribution
mount
Show mounted filesystems
date
Show system date
uptime
Show uptime
whoami
Show your username
man command
Show manual for command
Bash Shortcuts
CTRL-c
Stop current command
CTRL-z
Sleep program
CTRL-a
Go to start of line
CTRL-e
Go to end of line
CTRL-u
Cut from start of line
CTRL-k
Cut to end of line
CTRL-r
Search history
!!
Repeat last command
!abc
Run last command starting with abc
!abc:p
Print last command starting with abc
!$
Last argument of previous command
ALT-.
Last argument of previous command
!*
All arguments of previous command
^abc^123
Run previous command, replacing abc with 123
Bash Variables
env
Show environment variables
echo $NAME
Output value of $NAME variable
export NAME=value
Set $NAME to value
$PATH
Executable search path
$HOME
Home directory
$SHELL
Current shell
Links
.
Endnoten