{"id":7111,"date":"2021-05-07T17:27:22","date_gmt":"2021-05-07T17:27:22","guid":{"rendered":"https:\/\/profi-tutorials.de\/linux\/?p=7111"},"modified":"2021-05-31T10:46:11","modified_gmt":"2021-05-31T10:46:11","slug":"befehl-histroy","status":"publish","type":"post","link":"https:\/\/profi-tutorials.de\/linux\/grundlagen\/befehl-histroy\/","title":{"rendered":"Der Befehl history"},"content":{"rendered":"<p>Der Befehl history wird verwendet, um eine Auflistung der zuletzt verwendeten Befehle auszugeben und einzelne Befehle erneut auszuf&uuml;hren. Dabei zeigt history nur die Befehle des jeweiligen Benutzers an, der den Befehl history ausgef&uuml;hrt hat. Grund f&uuml;r die Anwendung dieses Befehls ist zum Beispiel um zu erfahren, wann und welcher Befehl in der Vergangenheit verwendet wurde.&nbsp;<\/p>\n<p>In diesem Beitrag wird Ihnen zun&auml;chst die grundlegende Anwendung des Befehls history vorgestellt. Anschlie&szlig;end lernen Sie den Befehl anhand g&auml;ngiger Anwendungsf&auml;lle n&auml;her kennen. Schlie&szlig;lich erfahren Sie auch, wie Sie den Befehl an Ihre eigenen Bed&uuml;rfnisse anpassen k&ouml;nnen.&nbsp;&nbsp;<\/p>\n<h2 id=\"t-1620051466734\">Anwendung von history<\/h2>\n<p>Der Befehl wird in der Regel in einem <a class=\"glossaryLink cmtt_Informatik\" aria-describedby=\"tt\" data-cmtooltip=\"&lt;div class=glossaryItemTitle&gt;TTY [Teletype]&lt;\/div&gt;&lt;div class=glossaryItemBody&gt;TTY steht f&uuml;r Teletype, welches das englische Wort f&uuml;r Fernschreiber ist, und steht in einem UNIX-System f&uuml;r ein Terminal.&lt;\/div&gt;&lt;div class=cmtt_synonyms_wrapper&gt;&lt;div class=cmtt_synonyms_title&gt;Synonyms: &lt;\/div&gt;&lt;div class=cmtt_synonyms&gt;Terminal&lt;\/div&gt;&lt;\/div&gt;\" href=\"https:\/\/profi-tutorials.de\/linux\/glossar\/tty\/\" target=\"_blank\" data-mobile-support=\"0\" data-gt-translate-attributes='[{\"attribute\":\"data-cmtooltip\", \"format\":\"html\"}]' tabindex=\"0\" role=\"link\">Terminal<\/a> ausgef&uuml;hrt. Wie eingangs bereits erw&auml;hnt, ist es dabei wichtig, von welchem Benutzer <strong>history<\/strong> im Terminal abgesetzt wird, denn nur von diesem Benutzer wird die History angezeigt.&nbsp;<\/p>\n<p>Im Folgenden sehen Sie die grundlegenden Anwendungen des Befehls ohne Optionen und Parameter.<\/p>\n<h5>Beispiel: Der Befehl history ohne Optionen und Parameter<\/h5>\n<h6 style=\"\"><span style=\"font-weight: normal;\">In diesem Beispiel wird der Befehl history ohne Optionen und Parameter ausgef&uuml;hrt, um die gesamte History des aktuellen Benutzers auszugeben.<\/span><\/h6>\n<h6>Eingabe:<\/h6>\n<p>history<\/p>\n<h6>Ausgabe:<\/h6>\n<p>498 cd \/etc\/<\/p>\n<p>499 nano bash.bashrc<\/p>\n<p>500 reboot<\/p>\n<p>501 clear<\/p>\n<p>502 cd \/<\/p>\n<p>503 history<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Der Befehl history wird verwendet, um eine Auflistung der zuletzt verwendeten Befehle auszugeben und einzelne Befehle erneut auszuf\u00fchren. Dabei zeigt history nur die Befehle des jeweiligen Benutzers an, der den Befehl history ausgef\u00fchrt hat. Grund f\u00fcr die Anwendung dieses Befehls ist zum Beispiel um zu erfahren, wann und welcher Befehl in der Vergangenheit verwendet wurde.&nbsp; [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":7249,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","tve_updated_post":"<div class=\"thrv_wrapper thrv_text_element\">\t<p>Der Befehl history wird verwendet, um eine Auflistung der zuletzt verwendeten Befehle auszugeben und einzelne Befehle erneut auszuf\u00fchren. Dabei zeigt history nur die Befehle des jeweiligen Benutzers an, der den Befehl history ausgef\u00fchrt hat. Grund f\u00fcr die Anwendung dieses Befehls ist zum Beispiel um zu erfahren, wann und welcher Befehl in der Vergangenheit verwendet wurde.&nbsp;<\/p><p>In diesem Beitrag wird Ihnen zun\u00e4chst die grundlegende Anwendung des Befehls history vorgestellt. Anschlie\u00dfend lernen Sie den Befehl anhand g\u00e4ngiger Anwendungsf\u00e4lle n\u00e4her kennen. Schlie\u00dflich erfahren Sie auch, wie Sie den Befehl an Ihre eigenen Bed\u00fcrfnisse anpassen k\u00f6nnen.&nbsp;&nbsp;<\/p><\/div><div class=\"thrv_wrapper thrv_contents_table\" data-columns=\"2\" data-headers=\"h2,h3\">\n\t<div class=\"tve_contents_table\">\n\t\t<span class=\"tve_ct_title\" style=\"\" data-css=\"tve-u-179329e17b3\">Inhaltsverzeichnis<\/span>\n\t\t<div class=\"tve_ct_content tve_clearfix\"><div class=\"ct_column\"><div class=\"tve_ct_level0\"><a href=\"#t-1620051466734\" rel=\"nofollow\">Anwendung von history<\/a><\/div><\/div><div class=\"ct_column\"><div class=\"tve_ct_level0\"><a href=\"#t-1620051466735\" rel=\"nofollow\"><\/a><\/div><\/div><\/div>\n\t<\/div>\n<\/div><div class=\"thrv_wrapper thrv_text_element\"><h2 class=\"\" id=\"t-1620051466734\">Anwendung von history<\/h2><p>Der Befehl wird in der Regel in einem Terminal ausgef\u00fchrt. Wie eingangs bereits erw\u00e4hnt, ist es dabei wichtig, von welchem Benutzer <strong>history<\/strong> im Terminal abgesetzt wird, denn nur von diesem Benutzer wird die History angezeigt.&nbsp;<\/p><p>Im Folgenden sehen Sie die grundlegenden Anwendungen des Befehls ohne Optionen und Parameter.<\/p><\/div><div class=\"thrv_wrapper thrv_contentbox_shortcode thrv-content-box tve-elem-default-pad\" data-css=\"tve-u-17932a3b33b\" style=\"\">\n\t<div class=\"tve-content-box-background\" style=\"\" data-css=\"tve-u-17932a3b334\"><\/div>\n\t<div class=\"tve-cb\"><div class=\"thrv_wrapper thrv_text_element\" data-css=\"tve-u-17932a3b333\" style=\"\"><h5 class=\"\" data-css=\"tve-u-17932a3b332\">Beispiel: Der Befehl history ohne Optionen und Parameter<\/h5><\/div><div class=\"thrv_wrapper thrv-divider\" data-style-d=\"tve_sep-1\" data-thickness-d=\"2\" data-color-d=\"rgb(66, 66, 66)\" data-css=\"tve-u-17932a3b335\" style=\"\">\n\t<hr class=\"tve_sep tve_sep-1\" style=\"\">\n<\/div><div class=\"thrv_wrapper thrv_text_element\"><h6 class=\"\" style=\"\" data-css=\"tve-u-17932a3b33d\"><span style=\"font-weight: normal;\">In diesem Beispiel wird der Befehl history ohne Optionen und Parameter ausgef\u00fchrt, um die gesamte History des aktuellen Benutzers auszugeben.<\/span><\/h6><\/div><div class=\"thrv_wrapper thrv_text_element\"><h6 class=\"\">Eingabe:<\/h6><\/div><div class=\"thrv_wrapper thrv_text_element\" style=\"\" data-css=\"tve-u-17932a3b337\"><p data-css=\"tve-u-17932a3b338\">history<\/p><\/div><div class=\"thrv_wrapper thrv_text_element\" style=\"\" data-css=\"tve-u-17932a3b33c\"><h6 class=\"\">Ausgabe:<\/h6><\/div><div class=\"thrv_wrapper thrv_text_element\" style=\"\" data-css=\"tve-u-17932a3b337\"><p data-css=\"tve-u-17932a3b338\">498 cd \/etc\/<\/p><p data-css=\"tve-u-17932a3b338\">499 nano bash.bashrc<\/p><p data-css=\"tve-u-17932a3b338\">500 reboot<\/p><p data-css=\"tve-u-17932a3b338\">501 clear<\/p><p data-css=\"tve-u-17932a3b338\">502 cd \/<\/p><p data-css=\"tve-u-17932a3b338\">503 history<\/p><\/div><\/div>\n<\/div>","tve_custom_css":"@media (min-width: 300px){[data-css=\"tve-u-179329e17b3\"] { background-color: var(--tcb-color-3); }:not(#tve) [data-css=\"tve-u-17932a3b332\"] { padding-top: 0px !important; margin-top: 0px !important; }[data-css=\"tve-u-17932a3b333\"] { overflow: hidden; background-color: transparent !important; background-image: none !important; border-radius: 0px !important; }[data-css=\"tve-u-17932a3b334\"] { border-radius: 30px; overflow: hidden; background-image: linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.08)) !important; background-size: auto !important; background-position: 50% 50% !important; background-attachment: scroll !important; background-repeat: no-repeat !important; }[data-css=\"tve-u-17932a3b335\"] .tve_sep { border-width: 2px !important; border-color: rgb(66, 66, 66) !important; }[data-css=\"tve-u-17932a3b335\"] { padding-top: 0px !important; padding-bottom: 10px !important; }[data-css=\"tve-u-17932a3b337\"] { background-image: linear-gradient(rgba(0, 0, 0, 0.13), rgba(0, 0, 0, 0.13)) !important; background-size: auto !important; background-position: 50% 50% !important; background-attachment: scroll !important; background-repeat: no-repeat !important; margin-bottom: 0px !important; padding: 5px 10px !important; }:not(#tve) [data-css=\"tve-u-17932a3b338\"] { padding-bottom: 0px !important; margin-bottom: 0px !important; font-family: \"Courier New\", Courier, monospace !important; font-weight: var(--g-regular-weight, normal)  !important; }[data-css=\"tve-u-17932a3b33b\"] { padding-bottom: 20px !important; }[data-css=\"tve-u-17932a3b33c\"] { margin-bottom: 0px !important; }:not(#tve) [data-css=\"tve-u-17932a3b33d\"] { line-height: 2em !important; padding-bottom: 0px !important; margin-bottom: 0px !important; padding-top: 0px !important; margin-top: 0px !important; }}","tve_user_custom_css":"","tve_globals":{"e":"1","font_cls":[]},"tcb2_ready":1,"tcb_editor_enabled":1,"tve_landing_page":"","_tve_header":"0","_tve_footer":"0"},"categories":[7],"tags":[],"class_list":["post-7111","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-grundlagen"],"_links":{"self":[{"href":"https:\/\/profi-tutorials.de\/linux\/wp-json\/wp\/v2\/posts\/7111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/profi-tutorials.de\/linux\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/profi-tutorials.de\/linux\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/profi-tutorials.de\/linux\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/profi-tutorials.de\/linux\/wp-json\/wp\/v2\/comments?post=7111"}],"version-history":[{"count":7,"href":"https:\/\/profi-tutorials.de\/linux\/wp-json\/wp\/v2\/posts\/7111\/revisions"}],"predecessor-version":[{"id":7185,"href":"https:\/\/profi-tutorials.de\/linux\/wp-json\/wp\/v2\/posts\/7111\/revisions\/7185"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/profi-tutorials.de\/linux\/wp-json\/wp\/v2\/media\/7249"}],"wp:attachment":[{"href":"https:\/\/profi-tutorials.de\/linux\/wp-json\/wp\/v2\/media?parent=7111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/profi-tutorials.de\/linux\/wp-json\/wp\/v2\/categories?post=7111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/profi-tutorials.de\/linux\/wp-json\/wp\/v2\/tags?post=7111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}