Word Processing
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
Linux word processing tools are essential for creating, editing, and formatting text documents. These tools range from simple text editors to full-featured word processors, providing users with a variety of options to suit their needs. They support a wide range of document formats, ensuring compatibility with other word processing software and platforms.
One of the key features of Linux word processing tools is their ability to handle complex formatting, including styles, tables, images, and hyperlinks. This allows users to create professional-looking documents with ease. Many word processors also offer features like spell check, grammar check, and thesaurus, enhancing the quality and accuracy of the text.
Collaboration is another important aspect of word processing tools. Many Linux word processors support real-time collaboration, allowing multiple users to work on the same document simultaneously. This is particularly useful for team projects, enabling seamless communication and coordination.
Linux word processing tools are also highly customizable, with options to add plugins and extensions that enhance functionality. Users can tailor the software to their specific needs, whether for academic writing, business reports, or creative projects. Additionally, many of these tools are open-source, providing the flexibility to modify and improve the software as needed.
Overall, Linux word processing tools offer a robust and versatile solution for handling text documents. They provide a wide range of features and customization options, making them suitable for both personal and professional use. Whether for simple note-taking or complex document creation, these tools are an indispensable part of the Linux ecosystem.
1 - 🖥️base64
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the base64 command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ██████╗ █████╗ ███████╗███████╗ ██████╗ ██╗ ██╗
# ██╔══██╗██╔══██╗██╔════╝██╔════╝██╔════╝ ██║ ██║
# ██████╔╝███████║███████╗█████╗ ███████╗ ███████║
# ██╔══██╗██╔══██║╚════██║██╔══╝ ██╔═══██╗╚════██║
# ██████╔╝██║ ██║███████║███████╗╚██████╔╝ ██║
# ╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝ ╚═════╝ ╚═╝
base64 --decode <<<VGhlIGZ1bGwgd29yZCAtLWRlY29kZSBvcHRpb24gaXMgbW9yZSB1bml2ZXJzYWwgdGhhbiAtZCAoTGludXgpIG9yIC1EIChCU0QvTWFjKQo=
# R29vZCwgbm93IHJldHdlZXQgbWUgc28gbW9yZSBwZW9wbGUga25vdyBiYXNlNjQgaXMgZXZlcnl3aGVyZSBhbmQgZWFzeSB0byBkZWNvZGUgLWNsaW1hZ2ljCg==
base64 -d<<<TVRoZAAAAAYAAQABAYBNVHJrAAAAOgD/UQOAAAAAkEV/CIBFfwCQRX8IgEV/AJBKfwiASn8AkEx/CIBMfwqQSX8IgEl/AJBKfwiASn//LwA=|timidity -
# Log!
base64 -w4095 file
# (remote: base64 -d > file) On short files over complex transfer paths between hosts, try copy/paste the base64 output.
base64 -d <<<TVRoZAAAAAYAAQABAYBNVHJrAAAAQAD/UQOZlmYAwAAAkFV/CJBOfwiQTn8IkFV/CJBOfwiQTn8IkFV/CJBOfwiQVn8IkE5//y8A |timidity -
#HappyHalloween This command plays a midi version of the theme from the movie Halloween.
#==============================##==============================#
# CMD base64 #
#==============================##==============================#
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command base64 in a clear format. This allows users to quickly access the needed information for base64 without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for base64 are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
2 - 🖥️boxes
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the boxes command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ██████╗ ██████╗ ██╗ ██╗███████╗███████╗
# ██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔════╝
# ██████╔╝██║ ██║ ╚███╔╝ █████╗ ███████╗
# ██╔══██╗██║ ██║ ██╔██╗ ██╔══╝ ╚════██║
# ██████╔╝╚██████╔╝██╔╝ ██╗███████╗███████║
# ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝
boxes -l | less
# Welche Rahmenstile das Programm bereithält, verrät es mit der Option -l (list). Auch diese Liste schaut man sich besser seitenweise an
boxes -d boxname alt neu
# Mit dem Parameter -d wählen Sie den gewünschten Stil
boxes -d boxname alt neu
# alt ist der Name der Originaldatei und neu der Name der gerahmten Ausgabedatei. Alternativ arbeitet das Tool auch mit der Standardein- und -ausgabe des Terminals
echo "Dies ist ein C-Kommentar"|boxes -d c-cmt2
/* Dies ist ein C-Kommentar */
# Hier zeigt sich boxes von einer höchst praktischen Seite: Das Tool zeichnet nicht nur Zierrahmen, sondern beherrscht auch die Kommentarstile zahlreicher Programmiersprachen. Dazu integriert man boxes am besten in den Text-Editor. Wie das in Jed und den üblichen Verdächtigen, Vim und Emacs, geht und auch wie Sie eigene Rahmen entwerfen, erfahren Sie auf der Boxes-Projektseite [2].
# Bei größeren Boxen (z. B. dem Rahmenstil dog in Abbildung 4) mit wenig Inhalt ist es sinnvoll, die Satzausrichtung zu definieren. Die Option -a leitet die Ausrichtung ein, gefolgt von c, r oder l (zentiert, rechts, links).
# Den Abstand zwischen Text und Rahmen bestimmt die Option -p (Padding), die Sie um Richtungsangabe und Zeichenzahl ergänzen. Zum Beispiel bedeutet -pa5t3r1: Der Inhalt ist in jeder Richtung fünf Zeichen vom Rahmen entfernt (a5). Lediglich vom oberen Rand trennen ihn drei Zeilen (t3) und vom rechten sogar nur ein Zeichen (r1). Folgende Angaben sind zusammen mit -p möglich:
# a: In alle Richtungen
# b: Zum Boden der Box
# h: In horizontaler Richtung
# l: Zur linken Seite der Box
# r: Zur rechten Seite der Box
# t: Zum Kopf (top) der Box
# v: In vertikaler Richtung
# Einen starren Rahmen, unabhängig vom Text, geben Sie mit der Option -s (size) vor. Im folgenden Beispiel erzwingen wir eine Box, die neun Zeichen breit und drei Zeilen hoch ist:
echo LINUX | boxes -s 9x3 -d shell
#########
# LINUX #
#########
# Der letzte wichtige Parameter lautet -r (remove). Mit ihm löschen Sie falsch gewählte oder unpassende Boxen, ohne den Inhalt anzutasten. boxes erkennt dabei automatisch den Rahmenstil und entfernte im Test sogar doppelte Rahmen mühelos.
### Default action
boxes
/**************************/
/* Different all twisty a */
/* of in maze are you, */
/* passages little. */
/**************************/
# Draws a standard box of the first valid design found in your config file. If you have the config file as it comes with the boxes distribution, you get a "C" box, as you can see above.
### Choosing a different design
boxes -d parchment
________________________
/\ \
\_|Different all twisty a|
|of in maze are you, |
|passages little. |
| ___________________|_
\_/_____________________/
The -d design_name option selects another design from your config file.
### Positioning of text inside box
boxes -d diamonds -a hcvc
/\ /\ /\
/\//\\/\ /\//\\/\ /\//\\/\
/\//\\\///\\/\//\\\///\\/\//\\\///\\/\
//\\\//\/\\///\\\//\/\\///\\\//\/\\///\\
\\//\/ \/\\//
\/ \/
/\ Different all twisty a /\
//\\ of in maze are you, //\\
\\// passages little. \\//
\/ \/
/\ /\
//\\/\ /\//\\
\\///\\/\//\\\///\\/\//\\\///\\/\//\\\//
\/\\///\\\//\/\\///\\\//\/\\///\\\//\/
\/\\//\/ \/\\//\/ \/\\//\/
\/ \/ \/
The -a format option can be used to position the input text inside a box which is larger than needed for our text. hcvc stands for "horizontally centered, vertically centered".
Note that the box was drawn in this size because the shapes that compose it are very big, so that it is not possible to fit the box tighter around our text. Note also that the input lines themselves are not centered; hc only centers the input text block as a whole.
### Line justification
boxes -d simple -a jr
************************
*Different all twisty a*
* of in maze are you,*
* passages little.*
************************
# This uses the third possible argument to the -a option, j. jr stands for "justification right".
### Quick alignment/positioning
boxes -d dog -a c
# __ _,--="=--,_ __ "
# / \." .-. "./ \
# / ,/ _ : : _ \/` \
# \ `| /o\ :_: /o\ |\__/
# `-'| :="~` _ `~"=: |
# \` (_) `/
# .-"-. \ | / .-"-.
#.---{ }--| /,.-'-.,\ |--{ }---.
# ) (_)_)_) \_/`~-===-~`\_/ (_(_(_) (
#( Different all twisty a )
# ) of in maze are you, (
#( passages little. )
# ) (
#'---------------------------------------'
# Since noone really wants to type -a hcvcjc only to actually center text inside a box, there are shorthand notations (l, c, and r).
# Note the blank line at the bottom of the box (after little, but before the dashes) which is necessary to make the bottom of the box look right. If the blank line was not there, the box would end on a closing parenthesis, thus looking broken.
### Box size specification
boxes -d html -s 40
<!-- ------------------------------- -->
<!-- Different all twisty a -->
<!-- of in maze are you, -->
<!-- passages little. -->
<!-- ------------------------------- -->
# Using -s 40, we have set the box width to 40 characters.
### Box size specification (2)
boxes -d peek -a c -s 40x11
/* _\|/_
(o o)
+----oOO-{_}-OOo----------------------+
| |
| |
| Different all twisty a |
| of in maze are you, |
| passages little. |
| |
| |
+------------------------------------*/
# Using -s 40x11, you can set both width and height. Setting just the height is possible with -s x11 (note the leading x on the argument).
### Text Padding
boxes -d shell -p a1l2
###########################
# #
# Different all twisty a #
# of in maze are you, #
# passages little. #
# #
###########################
# Normally, the padding values depend on the design. The "shell" design has no default padding, so we can see the effects of our command line option unchanged. a1l2 stands for "all 1, left 2", and tells boxes to put one space (or empty line, in the vertical direction) around the input text block, except for the left side where two spaces shall be used.
### Text Padding (2)
boxes -p h0v0
/************************/
/*Different all twisty a*/
/*of in maze are you, */
/*passages little. */
/************************/
# This uses again the default design, which by default features a horizontal padding value of one space (as you know from the very first example). By specifying -p h0v0, we set all padding to zero ("horizontal 0, vertical 0"). In this case, the same could have been achieved by -p h0 or -p a0.
### Regional comments
# Imagine you want to comment out the following C code:
if (!s2 || *s2 == '\0')
return (char *) s1; /* error 1 */
if (!s1 || *s1 == '\0')
return NULL; /* error 2 */
if (skip < 0)
skip = 0; /* foo bar */
boxes -d c-cmt
/* if (!s2 || *s2 == '\0') */
/* return (char *) s1; /* error 1 *\/ */
/* if (!s1 || *s1 == '\0') */
/* return NULL; /* error 2 *\/ */
/* if (skip < 0) */
/* skip = 0; /* foo bar *\/ */
# Note that the closing comment tags in the input text have been escaped by adding a backslash between the asterisk and the slash. This way, the comments that have been commented out along with the rest of the code will not interfere with the new comments.
boxes -r
if (!s2 || *s2 == '\0')
return (char *) s1; /* error 1 */
if (!s1 || *s1 == '\0')
return NULL; /* error 2 */
if (skip < 0)
skip = 0; /* foo bar */
# Should you decide to reactivate the code previouly commented out, the escaped closing comment tags are changed back into normal ones. This is achieved by the replace and reverse statements in the config file entry describing this particular box design. If you want this to work recursively, simply add more such statements.
### Box removal
# Imagine your once beautiful box in "C" style like this in your editor, after you are done editing the text inside:
/********************************************************************/
/* Generate sorted listing of available box styles.
Uses design name from BOX spec and sample picture plus author.
*/
/* RETURNS: != 0 on error (out of memory) */
== 0 on success */
/********************************************************************/
boxes -r
# Generate sorted listing of available box styles.
# Uses design name from BOX spec and sample picture plus author.
RETURNS: != 0 on error (out of memory)
== 0 on success
# The box is correctly removed even though it’s been badly damaged by editing of the text inside. Obviously, the box design was correctly autodected as being "C". Note there is only a single leading space in the output text, whereas there are two leading spaces in the input text. This is because the "C" box design has a default horizontal padding of one space. Since boxes assumes it has added the padding space, it also attempts to removes the same number of spaces when removing the box. Thus, if you were to add a new box around the text, the box internal indentation would be retained. It is easily possible to use this feature to make an editor key mapping which repairs a box for you (see installation in the documentation section).
### Box removal (2)
# Imagine an HTML comment box like the follwing, and imagine that boxes does not correctly autodetect it as being an HTML box:
<!-- - - - - - - - - - - - - -->
<!-- Different all twisty a -->
<!-- of in maze are you, -->
<!-- passages little. -->
<!-- - - - - - - - - - - - - -->
boxes -r -d html
# Different all twisty a
# of in maze are you,
# passages little.
# In cases where design autodetection fails, -d design_name can be added to the -r command in order to tell boxes which design exactly to remove. It is always a good thing to use the -d option, because it makes autodetection unnecessary. Autodetection takes more time, because the entire config file must be parsed instead of just the one design needed, and all designs must be matched against the input text in order to see which one fits best.
### Indentation handling
# For this example, our input text is indented by four spaces:
Different all twisty a
of in maze are you,
passages little.
boxes -d java-cmt -i box
// Different all twisty a
// of in maze are you,
// passages little.
# The default indent mode is box, which indents the box by the same value as the input text was indented. As shown here, this is useful when adding regional comments to your source code, e.g. when "commenting out" a large portion of your code. Most people generally prefer to indent comments by the same value as the code they refer to, so they don’t upset the code structure.
boxes -d vim-cmt -i text
" Different all twisty a
" of in maze are you,
" passages little."
# By specifying -i text, the box is made to start at column zero and any input text indentation is retained inside the box.
boxes -d pound-cmt -i none
# Different all twisty a
# of in maze are you,
# passages little.
# Finally, it is also possible to throw away any indentation altogether by specifying -i none.
### Use of Regular Expressions
# Global Variables
boxes -d headline
/*************************************/
/* G l o b a l V a r i a b l e s */
/*************************************/
# The replace and reverse statements may contain regular expressions and backreferences, which can be used for more elaborate text modifications. The example shown here, where spaces are inserted between the individual characters, is configured like this.
boxes -d headline -r
Global Variables
twisted
stark1
diamonds
shell
$ cat greeting.txt | boxes -d diamonds -a c
Which will give us the output as follows:
/\ /\ /\
/\//\\/\ /\//\\/\ /\//\\/\
/\//\\\///\\/\//\\\///\\/\//\\\///\\/\
//\\\//\/\\///\\\//\/\\///\\\//\/\\///\\
\\//\/ \/\\//
\/ \/
/\ I'm wishing you all a /\
//\\ joyous holiday season //\\
\\// and a Happy Gnu Year! \\//
\/ \/
/\ /\
//\\/\ /\//\\
\\///\\/\//\\\///\\/\//\\\///\\/\//\\\//
\/\\///\\\//\/\\///\\\//\/\\///\\\//\/
\/\\//\/ \/\\//\/ \/\\//\/
\/ \/ \/
Or perhaps something more fun, like:
echo "I am a dog" | boxes -d dog -a c
Which will, unsurprisingly, give you the following:
__ _,--="=--,_ __
/ \." .-. "./ \
/ ,/ _ : : _ \/` \
\ `| /o\ :_: /o\ |\__/
`-'| :="~` _ `~"=: |
\` (_) `/
.-"-. \ | / .-"-.
.---{ }--| /,.-'-.,\ |--{ }---.
) (_)_)_) \_/`~-===-~`\_/ (_(_(_) (
( I am a dog )
) (
'---------------------------------------'
Boxes comes with lots of options for padding, position, and even processing regular expressions. You can learn more about boxes on the project's homepage, or head over to GitHub to download the source code or contribute your own box. In fact, if you're looking for an idea to submit, I've got an idea for you: why not a holiday present?
_ _
/_\/_\
_______\_\/_/_______
| ///\\\ |
| /// \\\ |
| |
| "Happy pull |
| request!" |
|____________________|
[email protected]:~$ figlet -w 120 hotline-nws.sh | boxes -d peek | boxes -d shell -p a1l2
############################################################################
# #
# _\|/_ #
# (o o) #
# +----oOO-{_}-OOo-----------------------------------------------------+ #
# | _ _ _ _ _ | #
# || |__ ___ | |_| (_)_ __ ___ _ ____ _____ ___| |__ | #
# || '_ \ / _ \| __| | | '_ \ / _ \_____| '_ \ \ /\ / / __| / __| '_ \ | #
# || | | | (_) | |_| | | | | | __/_____| | | \ V V /\__ \_\__ \ | | || #
# ||_| |_|\___/ \__|_|_|_| |_|\___| |_| |_|\_/\_/ |___(_)___/_| |_|| #
# | | #
# +-------------------------------------------------------------------*/ #
# #
############################################################################
#==============================##==============================#
# CMD boxes #
#==============================##==============================#
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command boxes in a clear format. This allows users to quickly access the needed information for boxes without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for boxes are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
3 - 🖥️cmp
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the cmp command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ██████╗███╗ ███╗██████╗
# ██╔════╝████╗ ████║██╔══██╗
# ██║ ██╔████╔██║██████╔╝
# ██║ ██║╚██╔╝██║██╔═══╝
# ╚██████╗██║ ╚═╝ ██║██║
# ╚═════╝╚═╝ ╚═╝╚═╝
Cmp
The cmp command is used to perform byte-by-byte comparison of two files.
$ cmp file1 file2
file1 file2 differ: byte 1, line 1
#######################
# cmp command
# The 'cmp' command lets you carry out byte-by-byte comparison of two files. The utility provides several features in the form of command line options. In this tutorial, we will discuss some of the key options that'll give you (a beginner) a good idea about how the tool works.
cmp -b file1.txt file2.txt
# Make cmp print differing bytes
cmp -i 10 file1.txt file2.txt
# Make cmp skip some initial bytes from both files
cmp -i 4:7 file1.txt file2.txt
# Moving on, the tool also allows you to skip different number of bytes from both files.
cmp -l file1.txt file2.txt
# Make cmp display byte position (and value) for all differing bytes
cmp -n 25 file1.txt file2.txt
# Limit number of bytes to be compared
pv file1.txt | cmp -l file3.txt > output.txt
# Display progress meter while using cmp command
cmp -s file1.txt file2.txt
# The tool also allows you to suppress the output it produces normally. This can be done using the -s command line option.
#==============================##==============================#
# CMD cmp #
#==============================##==============================#
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command cmp in a clear format. This allows users to quickly access the needed information for cmp without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for cmp are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
4 - 🖥️convmv
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the convmv command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ██████╗ ██████╗ ███╗ ██╗██╗ ██╗███╗ ███╗██╗ ██╗
# ██╔════╝██╔═══██╗████╗ ██║██║ ██║████╗ ████║██║ ██║
# ██║ ██║ ██║██╔██╗ ██║██║ ██║██╔████╔██║██║ ██║
# ██║ ██║ ██║██║╚██╗██║╚██╗ ██╔╝██║╚██╔╝██║╚██╗ ██╔╝
# ╚██████╗╚██████╔╝██║ ╚████║ ╚████╔╝ ██║ ╚═╝ ██║ ╚████╔╝
# ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═══╝ ╚═╝ ╚═╝ ╚═══╝
convmv - filename encoding conversion tool
# Convert & rename all filenames to lower case
convmv --lower --notest FILE
# Convert & rename all filenames to higher case
convmv --higher --notest FILE
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command convmv in a clear format. This allows users to quickly access the needed information for convmv without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for convmv are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
5 - 🖥️dialog
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the dialog command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ██████╗ ██╗ █████╗ ██╗ ██████╗ ██████╗
# ██╔══██╗██║██╔══██╗██║ ██╔═══██╗██╔════╝
# ██║ ██║██║███████║██║ ██║ ██║██║ ███╗
# ██║ ██║██║██╔══██║██║ ██║ ██║██║ ██║
# ██████╔╝██║██║ ██║███████╗╚██████╔╝╚██████╔╝
# ╚═════╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═════╝
dialog --textbox dock.sh 50 1000
# Bash Dialog
# The dialog utility is used to create a basic level graphical user interface. We can use this in Shell script to create very useful programs. This is sample output
# #!/bin/bash
# color_code="\e[93m"
# function d_container {
# echo "t"
# }
#
# function d_images {
# echo "t"
# }
#
# function d_search {
# clear
# read keyword
# docker search $keyword
# }
#
# function d_install {
# apt install docker.io
# echo "[OK] Docker istalled"
# }
#
# function d_remove {
# apt remove docker* --purge
# echo "[OK] Docker Removed"
# exit
# }
#
# function d_start {
# clear
# service docker start
# echo "[OK] Docker Started"
# }
#
#
#==============================##==============================#
# CMD dialog #
#==============================##==============================#
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command dialog in a clear format. This allows users to quickly access the needed information for dialog without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for dialog are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
6 - 🖥️egrep
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the egrep command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ███████╗ ██████╗ ██████╗ ███████╗██████╗
# ██╔════╝██╔════╝ ██╔══██╗██╔════╝██╔══██╗
# █████╗ ██║ ███╗██████╔╝█████╗ ██████╔╝
# ██╔══╝ ██║ ██║██╔══██╗██╔══╝ ██╔═══╝
# ███████╗╚██████╔╝██║ ██║███████╗██║
# ╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝
egrep
Extended grep
The egrep command uses fancier regular expressions than the grep command. Many people use the egrep command for its internal algorithms, which are more sophisticated than the grep and fgrep commands. Also, the egrep command is usually the fastest of the three programs.
egrep -o "from=<[^>]+\.[a-z0-9-]{2,}>" /var/log/maillog |awk -F\. '{print $NF}' |sort |uniq -c |sort -rn |head -20
# .Top 20 email From TLDs
egrep -wo "(Donnie|Frank|Roberta|Grandma)" story.txt |sort|uniq -c|sort -r
# Search for names and build a frequency count for each name.
egrep -oi '#[a-f0-9]{6}' file.css | sort | uniq
# extract all unique hex color codes from a CSS file /cc
egrep -v "^#|^$" httpd.conf
# display the httpd.conf file contents and exclude blank lines and lines that start with comment character.
egrep -o '\b[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\b' /var/log/apache2/access.log | sort -u
# Display IPs accessing your Apache webserver.
egrep "^lease" /var/lib/dhcp/db/dhcpd.leases |awk '{ print $2 }'
# get IPs with a DHCP lease
# You can use that to create a excludefile for nmap, to find hosts, with no DHCP lease in your DHCP range.
egrep -i "@[a-z\.-]+\.[a-z]{2}\>" emails.txt
# Find email addresses with 2 letter TLDs in them. \> matches empty string at end of a word.
#==============================##==============================#
# CMD EGREP #
#==============================##==============================#
egrep -- "\t-\t-\t-\t-\t" entries.txt |sort -k3V
# Get the entries with 4+ null fields and sort the entries by IPv4 (-V) in the 3rd column.
egrep -v '(Teardown|Built)' *.log
# Kommentarzeilen ausblenden
egrep -v'^\s*(#|$)' /etc/squid3
egrep = "Extended GREP"
egrep uses fancier regular expressions than grep. Many people
use egrep all the time, since it has some more sophisticated
internal algorithms than grep or fgrep, and is usually the
fastest of the three programs.
tail -f "foo.log"|egrep --line-buffered --color=auto 'ERROR|WARN|CRITICAL$'
# tail foo.log & highlight errors and warnings (if your grep supports --color)
last -da | egrep -v "^(root|reboot|asmith) "
# See the last logged in users, but filter out entries for root, reboots and asmith.
egrep -v "^#|^$" httpd.conf
# display the httpd.conf file contents and exclude blank lines and lines that start with comment character.
egrep "(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])" tmp | awk -F"," '{split($2,name,".");printf("%s;%s\n",$1,name[1])}' | sort -t";" -k2,2 | uniq > hardware_sorted.tmp
# egrep for fail logins
egrep "Failed|Failure" /var/log/auth.log
#==============================##==============================#
# CMD EGREP #
#==============================##==============================#
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command egrep in a clear format. This allows users to quickly access the needed information for egrep without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for egrep are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
7 - 🖥️fgrep
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the fgrep command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ███████╗ ██████╗ ██████╗ ███████╗██████╗
# ██╔════╝██╔════╝ ██╔══██╗██╔════╝██╔══██╗
# █████╗ ██║ ███╗██████╔╝█████╗ ██████╔╝
# ██╔══╝ ██║ ██║██╔══██╗██╔══╝ ██╔═══╝
# ██║ ╚██████╔╝██║ ██║███████╗██║
# ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝
#==============================#
# CMD FGREP
#==============================##==============================#
fgrep
Fixed grep
The fgrep command searches for fixed strings only, possibly taking the strings from another file. The "f" does not stand for "fast"; in fact, at times, using the fgrep command can be slower than using the egrep command. However, the fgrep command may still be useful when searching a file for a larger number of strings than the egrep command can handle.
fgrep --binary-files=text -C 2000 "string in file" /dev/sda > recovereddata.out
# *"Attempt"* to recover an accidentally removed file.
fgrep 22/Mar/2015 access_log |awk '$1~/\.[a-z][a-z]$/{print $6 " " $7}'
# For Mar 22nd, print the req fields for hosts from two letter gTLD
fgrep -f words.txt file1
# grep for all words which in words.txt in the file file1
# fgrep is the same as grep -F or egrep -F
fgrep = "Fixed GREP".
fgrep searches for fixed strings only. The "f" does not stand
for "fast" - in fact, "fgrep foobar *.c" is usually slower than
"egrep foobar *.c" (Yes, this is kind of surprising. Try it.)
Fgrep still has its uses though, and may be useful when searching
a file for a larger number of strings than egrep can handle.
fgrep 22/Mar/2013 access_log |awk '$1~/\.[a-z][a-z]$/{print $6 " " $7}'
# For Mar 22nd, print the req fields for hosts from two letter gTLD
fgrep Invalid\ user auth.log | head -n 5 | awk '{ print $10 }' | ursort
fgrep Invalid\ user auth.log | wc -l
fgrep Invalid\ user auth.log | head -n 5 | awk '{ print $10 }' 188.165.201.89
fgrep Invalid\ user auth.log | head -n 5
fgrep Invalid\ user auth.log | head -n 5 | awk '{ print $10 }' | sort | uniq -c | sort -rn
#==============================##==============================#
# CMD FGREP
#==============================##==============================#
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command fgrep in a clear format. This allows users to quickly access the needed information for fgrep without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for fgrep are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
8 - 🖥️jot
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the jot command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ██╗ ██████╗ ████████╗
# ██║██╔═══██╗╚══██╔══╝
# ██║██║ ██║ ██║
# ██ ██║██║ ██║ ██║
# ╚█████╔╝╚██████╔╝ ██║
# ╚════╝ ╚═════╝ ╚═╝
# prints 21 evenly spaced numbers increasing from -1 to 1
jot 21 -1 1.00
# Show the ASCII character set
jot -c 128 0
# strings xaa through xaz with
jot -w xa%c 26 a
# 20 random 8-letter strings are produced with
jot -r -c 160 a z | rs -g 0 8
# Infinitely many yes's may be obtained through
jot -b yes 0
# thirty ed(1) substitution commands applying to lines 2, 7, 12, etc.
jot -w %ds/old/new/ 30 2 - 5
# The stuttering sequence 9, 9, 8, 8, 7, etc. can be produced by suitable
# choice of precision and step size, as in
jot 0 9 - -.5
# Generate a file containing exactly 1024 bytes is created with
jot -b x 512 > block
# set tabs four spaces apart starting from column 10 and
# ending in column 132
expand -`jot -s, - 10 132 4`
# print all lines 80 characters or longer
grep `jot -s "" -b . 80`
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command jot in a clear format. This allows users to quickly access the needed information for jot without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for jot are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
9 - 🖥️jq
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the jq command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ██╗ ██████╗
# ██║██╔═══██╗
# ██║██║ ██║
# ██ ██║██║▄▄ ██║
# ╚█████╔╝╚██████╔╝
# ╚════╝ ╚══▀▀═╝
# A lightweight and flexible command-line JSON processor.
# Output a JSON file, in pretty-print format:
jq
# Output all elements from arrays
# (or all key-value pairs from objects) in a JSON file:
jq .[]
# Read JSON objects from a file into an array, and output it (inverse of jq .[]):
jq --slurp
# Output the first element in a JSON file:
jq .[0]
# Output the value of a given key of the first element in a JSON file:
jq .[0].key_name
# Output the value of a given key of each element in a JSON file:
jq 'map(.key_name)'
#
# [ { foo: 1 }, { foo: 2 } ] => [1, 2]
# Extract as stream of values instead of a list
jq '.[] | .foo'
#
# [ { "foo": 1 }, { "foo": 2 } ] => 1, 2
# Slicing
jq '.[1:2]'
#
# [ { "foo": 1 }, { "foo": 2 } ] => { "foo": 2 }
# Dictionary subset shorthand
jq 'map({ a, b })'
#
# [ { "a": 1, "b": 2, "c": 3 }, ...] => [ { "a": 1, "b": 2 }, ...]
# Parsing json
jq 'with_entries(.value |= fromjson)' --sort-keys
#
# { "b": "{}", "a": "{}" }
# => { "a": {}, "b": {} }
# Serializing json
#
jq 'with_entries(.value |= tojson)' --sort-keys
#
# { "a": {}, "b": {} }
# => { "a": "{}", "b": "{}" }
# Flattening json
jq 'flatten(1)'
#
# [[1], [2]]
# => [1, 2]
# Converting to csv
jq '.[] | [.foo, .bar] | @csv' -r
#
# [{ "foo": 1, "bar": 2, "baz":3 }]
# => 1,2
# Sort
jq 'sort'
# [3, 2, 1]
# => [1, 2, 3]
# Deleting duplicates (dedup / uniq)
jq unique
#
# [1, 1, 2, 1]
# => [1, 2]
# Sort lines of a file
jq --slurp '. | sort | .[]'
# Converting arbitrary data to json
jq -r '(map(keys) | add | unique | sort) as $cols | .[] as $row | $cols | map($row[.]) | @csv'
# [ { "foo": 1, "bar": 2}, { "foo": 3, "baz": 4}]
#
# => 2,,1
# ,4,3
# Pretty print the json
jq "." < filename.json
# Access the value at key "foo"
jq '.foo'
# Access first list item
jq '.[0]'
# Slice & Dice
jq '.[2:4]'
jq '.[:3]'
jq '.[-2:]'
cat file.json | jq
# use jq to validate and pretty-print json output
# the `jq` tool can also be used do validate json files and pretty print output `cat file.json | jq` available on several platforms, including newer debian-based systems via `#sudo apt install jq`, mac via `brew install jq`, and from source https://stedolan.github.io/jq/download/ This is sample output - yours may be different.
success:
{
"foo": "bar"
}
error:
$ echo '{"foo":{"bar":}}'| jq
parse error: Unmatched '}' at line 1, column 15
diff <(jq . -M -S < old.json) <(jq . -M -S < new.json)
# Get a diff of two json arrays - jq is amazing for manipulating json on the commandline, but the developers have some weird ideas about how to handle shell redirections. This command works around them. Further reading: https://github.com/stedolan/jq/issues/1110
jq < file.json
# Use jq to validate and pretty-print json output
# The `jq` tool can also be used do validate json files and pretty print output: ` jq < file.json` Available on several platforms, including newer debian-based systems via `#sudo apt install jq`, mac via `brew install jq`, and from source https://stedolan.github.io/jq/download/ This alternative to the original avoids the useless use of cat This is sample output - yours may be different.
success:
{
"foo": "bar"
}
error:
$ jq < file.json
parse error: Unmatched '}' at line 1, column 15
#==============================##==============================#
# CMD JQ #
#==============================##==============================#
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command jq in a clear format. This allows users to quickly access the needed information for jq without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for jq are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
10 - 🖥️paste
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the paste command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ██████╗ █████╗ ███████╗████████╗███████╗
# ██╔══██╗██╔══██╗██╔════╝╚══██╔══╝██╔════╝
# ██████╔╝███████║███████╗ ██║ █████╗
# ██╔═══╝ ██╔══██║╚════██║ ██║ ██╔══╝
# ██║ ██║ ██║███████║ ██║ ███████╗
# ╚═╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚══════╝
# Concat columns from files
paste file1 file2 ...
# List the files in the current directory in three columns:
ls | paste - - -
# Combine pairs of lines from a file into single lines:
paste -s -d '\t\n' myfile
# Number the lines in a file, similar to nl(1):
sed = myfile | paste -s -d '\t\n' - -
# Create a colon-separated list of directories named bin,
# suitable for use in the PATH environment variable:
find / -name bin -type d | paste -s -d : -
# Display two calendar months side by side - The Linux's `cal` command is nice, but there are times when I need to see two months side by side and this command will do it. Show Sample Output
paste <(cal 8 2018) <(cal 9 2018)
paste <(cal 2013) <(cal 2014)
# Look at the full year calendar for 2013 and 2014 side by side. (Requires term width > 135).
# Rename all files in a directory to lowercase names
paste <(ls) <(ls | tr A-Z a-z) | while read OLD NEW; do echo mv -v $OLD $NEW; done
# Explanation:
# <(cmd) is the filename of a named pipe (FIFO), where the named pipe is filled by the output of cmd
# paste puts together the named pipes to form two columns: first column with the original filenames, second column with the lowercased filenames
# ... | tr abc ABC transforms stdin by replacing any characters that appear in the first set of letters to the second set of letters
# while read old new; do ...; done for each line it reads the first column into $old and the second column into $new
# Limitations:
# Will not work if there are spaces in a filename.
# Textfiles formatieren - Gelegentlich muss ich Textdateien anders formatieren, Leerzeilen entfernen, den Umbruch verschieben...
# Grep entfernt alle Leerzeilen, paste fügt alles zu einer langen Textwurst zusammen, getrennt durch ein Leerzeichen und fold bricht dann beim letzten Wortende vor Spalte 70 um.
grep -v '^$' loreipsum.txt | paste -s -d ' ' | fold -s -w 70
# cat & split
#---------------#
# Erklärung: Hier wird eine 100MB große Datei angelegt, die in 14MB große einzelne Dateien zerlegt wird und danach wieder zusammengefügt wird.
dd if=/dev/urandom of=test1.big count=100 bs=1M
split -b14m test1.big
cat x?? > test2.big
md5sum test.big test2.big
tac
# Erklärung: Hier wird einen Liste der letzten installierten Pakete ausgeben und anschließend herumgedreht, damit das letzte installierte Paket unten in der Liste steht.
rpm -qa --last | tac
cut
# Erklärung: Hier werden die ersten 25 Bytes aus Logfile messages vom Seiten-Anfang herausgeschnitten, setzt man das Minus vor die Zahl wird alles nach den 25 Byte herausgeschnitten
cut -b25- /var/log/messages | sort
cut & paste
# Erklärung: Ausschneiden von Textausschnitte aus einer Datei, in einzelne Dateien kopiert und dann wieder zusammen in eine Datei zusammengeführt.
cut -d: -f1-3 /etc/passwd > spalte1-3
cut -d: -f4- /etc/passwd > spalte4-7
# Wieder zusammensetzen
paste -d: spalte1-3 spalte4-7
sort mit du
# Erklärung: Hier wird mit du (disk usage) die Größe der Verzeichnisse ausgegeben und sortiert
du -mx / | sort -n
# Hier ist der Beitrag Disk Usage (du) von mir, wenn jemand das Tool noch nicht kennen sollte.
# Noch ein Beispiel:
sort -t : -k 3n /etc/passwd
# Erklärung: Hier werden die User in der passwd nach der id sortiert aufsteigend sortiert, Trenner ist der Doppelpunkt.
column
# Erklärung: Hier werden die IP-Routen schön in Spalten angezeigt um die Lesbarkeit zu verbessern.
ip r s | column -t
pr
# Erklärung: Hier wird die Ausgabe des Textes zur besseren Lesbarkeit oder zum Ausdrucken aufbereitet und mit Seitenzahl angezeigt
wget -q -O - www.gnu.org/licenses/gpl-3.0.txt | pr | less
#==============================##==============================#
# CMD PASTE #
#==============================##==============================#
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command paste in a clear format. This allows users to quickly access the needed information for paste without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for paste are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
11 - 🖥️pbcopy
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the pbcopy command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ██████╗ ██████╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗
# ██╔══██╗██╔══██╗██╔════╝██╔═══██╗██╔══██╗╚██╗ ██╔╝
# ██████╔╝██████╔╝██║ ██║ ██║██████╔╝ ╚████╔╝
# ██╔═══╝ ██╔══██╗██║ ██║ ██║██╔═══╝ ╚██╔╝
# ██║ ██████╔╝╚██████╗╚██████╔╝██║ ██║
# ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝
# pbcopy
# Place standard output in the clipboard.
# Place the contents of a file in the clipboard:
pbcopy < file
# Place the results of a command in the clipboard:
find . -type t -name "*.png" | pbcopy
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command pbcopy in a clear format. This allows users to quickly access the needed information for pbcopy without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for pbcopy are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
12 - 🖥️pbpaste
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the pbpaste command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# pbpaste
# Send the contents of the clipboard to standard output.
# Write the contents of the clipboard to a file:
pbpaste > file
# Use the contents of the clipboard as input to a command:
pbpaste | grep foo
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command pbpaste in a clear format. This allows users to quickly access the needed information for pbpaste without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for pbpaste are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
13 - 🖥️pdf2txt
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the pdf2txt command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ██████╗ ██████╗ ███████╗██████╗ ████████╗██╗ ██╗████████╗
# ██╔══██╗██╔══██╗██╔════╝╚════██╗╚══██╔══╝╚██╗██╔╝╚══██╔══╝
# ██████╔╝██║ ██║█████╗ █████╔╝ ██║ ╚███╔╝ ██║
# ██╔═══╝ ██║ ██║██╔══╝ ██╔═══╝ ██║ ██╔██╗ ██║
# ██║ ██████╔╝██║ ███████╗ ██║ ██╔╝ ██╗ ██║
# ╚═╝ ╚═════╝ ╚═╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝
pdf2txt cv.pdf | grep -C3 -i phone
# Grab a phone number from a CV pdf file on a remote machine so you do not have to go through the trouble of copying it all around. Hopefully they do not ignore your call. (Thanks telemarketing industry. *grumble* *grumble*)
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command pdf2txt in a clear format. This allows users to quickly access the needed information for pdf2txt without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for pdf2txt are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
14 - 🖥️pdftk
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the pdftk command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ██████╗ ██████╗ ███████╗████████╗██╗ ██╗
# ██╔══██╗██╔══██╗██╔════╝╚══██╔══╝██║ ██╔╝
# ██████╔╝██║ ██║█████╗ ██║ █████╔╝
# ██╔═══╝ ██║ ██║██╔══╝ ██║ ██╔═██╗
# ██║ ██████╔╝██║ ██║ ██║ ██╗
# ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝
# Concatenate all pdf files into one:
pdftk *.pdf cat output all.pdf
# Concatenate specific pdf files into one:
pdftk 1.pdf 2.pdf 3.pdf cat output 123.pdf
# Concatenate pages 1 to 5 of first.pdf with page 3 of second.pdf
pdftk A=fist.pdf B=second.pdf cat A1-5 B3 output new.pdf
# Cut select pages from a pdf file and create a new file from those pages.
pdftk input.pdf cat 2-4 7 9-10 output output.pdf
# Explanation:
# pdftk is the PDF Toolkit
# input.pdf is the input file.
# cat 2-4 7 9-10 concatenate (combine) pages 2,3,4,7,9,10 of input.pdf.
# output output.pdf the resulting pdf file containing the above pages.
## Alternative one-liners:
# Cut select pages from a pdf file and create a new file from those pages.
ps2pdf -dFirstPage=3 -dLastPage=10 input.pdf output.pdf
# Explanation: ps2pdf is a script that comes with Ghostscript - despite the name, it can accept PDF files as input, not just postscript files.
# Limitations: Only a single contiguous range of pages can be specified.
#==============================##==============================#
# CMD PDFTK #
#==============================##==============================#
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command pdftk in a clear format. This allows users to quickly access the needed information for pdftk without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for pdftk are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
15 - 🖥️pygmentize
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the pygmentize command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ██████╗ ██╗ ██╗ ██████╗ ███╗ ███╗███████╗███╗ ██╗████████╗██╗███████╗███████╗
# ██╔══██╗╚██╗ ██╔╝██╔════╝ ████╗ ████║██╔════╝████╗ ██║╚══██╔══╝██║╚══███╔╝██╔════╝
# ██████╔╝ ╚████╔╝ ██║ ███╗██╔████╔██║█████╗ ██╔██╗ ██║ ██║ ██║ ███╔╝ █████╗
# ██╔═══╝ ╚██╔╝ ██║ ██║██║╚██╔╝██║██╔══╝ ██║╚██╗██║ ██║ ██║ ███╔╝ ██╔══╝
# ██║ ██║ ╚██████╔╝██║ ╚═╝ ██║███████╗██║ ╚████║ ██║ ██║███████╗███████╗
# ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚═╝╚══════╝╚══════╝
# highlight syntax: use go lexer, style monokai, 256 colors terminal
pygmentize -f terminal256 -l go -g -P style=monokai
# use filter (keywordcase), will change keywords to upper case
pygmentize -f html -l pascal -F keywordcase:case=upper main.pas
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command pygmentize in a clear format. This allows users to quickly access the needed information for pygmentize without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for pygmentize are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
16 - 🖥️rev
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the rev command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ██████╗ ███████╗██╗ ██╗
# ██╔══██╗██╔════╝██║ ██║
# ██████╔╝█████╗ ██║ ██║
# ██╔══██╗██╔══╝ ╚██╗ ██╔╝
# ██║ ██║███████╗ ╚████╔╝
# ╚═╝ ╚═╝╚══════╝ ╚═══╝
echo test | rev | cut -c 2- | rev
# Use rev twice to get around limitation of cut not being able to truncate end of a string.
rev temp.txt > pmet.txt
# Reverse the text in each line of a file using 'rev' (reverse line) command
# Reverse using rev and <<< for input.
rev <<<".xatnys codereh siht gnisu ecnetnes a fo srettel eht esrever ylisae nac uoY"
#==============================##==============================#
# CMD REV #
#==============================##==============================#
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command rev in a clear format. This allows users to quickly access the needed information for rev without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for rev are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
17 - 🖥️shuf
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the shuf command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ███████╗██╗ ██╗██╗ ██╗███████╗
# ██╔════╝██║ ██║██║ ██║██╔════╝
# ███████╗███████║██║ ██║█████╗
# ╚════██║██╔══██║██║ ██║██╔══╝
# ███████║██║ ██║╚██████╔╝██║
# ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝
shuf -n5 names.txt
# Pick 5 random lines (names in this case) from a file called names.txt.
ls | shuf
# Shuffle input - The “shuf” command randomly select lines/files/folder from a file/folder. First list the contents of a folder using ls command.
ls | shuf -n1
# Pick on random selection - Note: You can always replace ‘n1‘ with ‘n2‘ to pick two random selection or any other number of random selection using n3, n4.…
shuf common-words-10k.txt |egrep ".{5,}" |head -64 |xargs -n4
# Generate 16 x 4 random long-word passphrases from a list of common words.
#==============================##==============================#
# CMD SHUF #
#==============================##==============================#
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command shuf in a clear format. This allows users to quickly access the needed information for shuf without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for shuf are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
18 - 🖥️strings
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the strings command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ███████╗████████╗██████╗ ██╗███╗ ██╗ ██████╗ ███████╗
# ██╔════╝╚══██╔══╝██╔══██╗██║████╗ ██║██╔════╝ ██╔════╝
# ███████╗ ██║ ██████╔╝██║██╔██╗ ██║██║ ███╗███████╗
# ╚════██║ ██║ ██╔══██╗██║██║╚██╗██║██║ ██║╚════██║
# ███████║ ██║ ██║ ██║██║██║ ╚████║╚██████╔╝███████║
# ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚══════╝
strings logo-medium.png|head
# I am disappointed the logo for @ImageTragick vuln was not actually made in ImageMagick.
strings /dev/urandom | tr -c -d '0-9' | dd of=randomnumbers.txt bs=1 count=1M
# Write 1MB (1048576) of random numbers to a file.
strings -n12 /dev/sdc
# Search a drive for text data, but use a longer minimum size (default 4) to get a better signal to noise ratio.
strings /dev/sdc | grep -C200 "Received: "
# Look for email data on a hard drive, even if it was "deleted". Encrypt your FS!
#==============================##==============================#
# CMD STRINGS
#==============================##==============================#
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command strings in a clear format. This allows users to quickly access the needed information for strings without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for strings are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
19 - 🖥️texte
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the texte command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ████████╗███████╗██╗ ██╗████████╗███████╗
# ╚══██╔══╝██╔════╝╚██╗██╔╝╚══██╔══╝██╔════╝
# ██║ █████╗ ╚███╔╝ ██║ █████╗
# ██║ ██╔══╝ ██╔██╗ ██║ ██╔══╝
# ██║ ███████╗██╔╝ ██╗ ██║ ███████╗
# ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝
# Vergeleichen von ungeraden Zahlen wie z.B. 1.2
if (( $(echo "$wert1 > $wert2" |bc -l) )); then
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command texte in a clear format. This allows users to quickly access the needed information for texte without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for texte are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
20 - 🖥️xargs
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the xargs command with important options and switches using examples.
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ██╗ ██╗ █████╗ ██████╗ ██████╗ ███████╗
# ╚██╗██╔╝██╔══██╗██╔══██╗██╔════╝ ██╔════╝
# ╚███╔╝ ███████║██████╔╝██║ ███╗███████╗
# ██╔██╗ ██╔══██║██╔══██╗██║ ██║╚════██║
# ██╔╝ ██╗██║ ██║██║ ██║╚██████╔╝███████║
# ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝
# find all file name ending with .pdf and remove them
find -name *.pdf | xargs rm -rf
# find all file name ending with .pdf and remove them
find -name \*.pdf | xargs rm
# find all file name ending with .pdf and remove them
# (bulletproof version: handles filenames with \n and skips *.pdf directories)
# -r = --no-run-if-empty
# -n10 = group by 10 files
find -name \*.pdf -type f -print0 | xargs -0rn10 rm
# group words by three in a string
seq 1 10 | xargs -n3 echo
# if file name contains spaces you should use this instead
find -name *.pdf | xargs -I{} rm -rf '{}'
# Will show every .pdf like:
# &toto.pdf=
# &titi.pdf=
# -n1 => One file by one file. ( -n2 => 2 files by 2 files )
find -name *.pdf | xargs -I{} -n1 echo '&{}='
xargs
# does some amazing things. But it seems a bit large for the Unix philosophy of tools.
xargs < file.txt
# This is an easy way to join a file into one line if you're in a hurry. Be careful with large data though, might truncate.
# but if you want to run different commands, well you can still do that.
echo -e "sleep 1; echo hi;\0echo hi; sleep 5;" | xargs -I {} -0 -n 1 -P 4 bash -c "{}";
# bash find Finding files which contain a certain string u
find . -type f -print | xargs grep "some string"
# Simple command to erase all the folders with a given name
# This is how to remove all folders with a given name (e.g. "CVS") starting from a root folder ('.' is the current folder)
find . -name <fileName> -type d -print0 | xargs -0 rm -fr
e.g.
find . -name CVS -type d -print0 | xargs -0 rm -fr
#Faciliate the work for lftp ('all' is needed if you wanna use it with getopts, otherwise its enough with the lftp line)
#Add this to a script and you can do ./scriptname site help or ./scriptname mput etc etc.
all="$(echo -e $*|awk '{for(i=3;i<=NF;++i)print $i}'|xargs)"; lftp -e open <HOSTNAME> -p <PORT> -u <USER>:<PASSWORD> -e "$all;exit"
# Remove all at jobs
atq | sed 's_\([0-9]\{1,8\}\).*_\1_g' | xargs atrm
# Explanation: It asks all jobs from atq, then parses a number with 1-8 digits (job id), then forwards that number via xargs to atrm
# Limitations: Only works with job id-s of up to 8 digits, but if you can find the 8, you can get around that.
# Remove files and directories whose name is a timestamp older than a certain time
ls | grep '....-..-..-......' | xargs -I {} bash -c "[[ x{} < x$(date -d '3 days ago' +%Y-%m-%d-%H%M%S) ]] && rm -rfv {}"
# Explanation: Suppose you have a backup directory with backup snapshots named by timestamp:
#ls
2013-05-03-103022
2013-05-04-103033
2013-05-05-103023
2013-05-06-103040
2013-05-07-103022
# You want to remove snapshots older than 3 days. The one-liner does it:
# date
# Tue May 7 13:50:57 KST 2013ls
# | grep '....-..-..-......' | sort | xargs -I {} bash -c "[[ x{} < x$(date -d '3 days ago' +%Y-%m-%d-%H%M%S) ]] && rm -rfv {}"
# removed directory: `2013-05-03-103022'
# removed directory: `2013-05-04-103033'
# Limitations: It does not work on OS X due to the differences between GNU date and BSD date).
# Clear the Exim Queue (remove all messages)
exim -bp | exiqgrep -i | xargs exim -Mrm
#==============================##==============================#
# CMD XARGS #
#==============================##==============================#
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command xargs in a clear format. This allows users to quickly access the needed information for xargs without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for xargs are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░