{"id":475,"date":"2018-09-14T18:26:19","date_gmt":"2018-09-14T15:26:19","guid":{"rendered":"http:\/\/melic.com\/wp1\/?p=475"},"modified":"2018-09-14T18:27:11","modified_gmt":"2018-09-14T15:27:11","slug":"ubuntu-ve-history-temizleme","status":"publish","type":"post","link":"https:\/\/melic.com\/wp1\/ubuntu-ve-history-temizleme\/","title":{"rendered":"Ubuntu ve History Temizleme"},"content":{"rendered":"<p>\u0130\u015fyerimde birden fazla i\u015fletim sistemi ile ha\u015f\u0131r ne\u015fir olmak zorunday\u0131m.Baz\u0131lar\u0131 son kullan\u0131c\u0131 d\u00fczeyindeyken baz\u0131lar\u0131da sunucu d\u00fczeyinde. S\u00fcrekli olarak projelerin pe\u015finde ko\u015ftu\u011fum i\u00e7in farkl\u0131 bir \u00e7ok i\u015fletim sistemlerini denemeye \u00e7al\u0131\u015f\u0131yorum.Bu kadar geni\u015f bir yelpazede \u00e7al\u0131\u015f\u0131yorsan\u0131z bilgi deryas\u0131 i\u00e7erisinde bo\u011fulmaman\u0131z m\u00fcmk\u00fcn de\u011fil.<\/p>\n<p>En basitinden bu kadar \u00e7ok par\u00e7aya b\u00f6l\u00fcnd\u00fc\u011f\u00fcn\u00fczde ya\u015fayabilece\u011finiz en basit s\u0131k\u0131nt\u0131 bir \u00e7ok komutu art\u0131k hat\u0131rlayamamak.Mesela bir \u00f6nceki g\u00fcn ya\u015fad\u0131\u011f\u0131n\u0131z komutu tekrar \u00e7al\u0131\u015ft\u0131rmak istedi\u011finizde tekrar yazmak i\u015fkence olabilir.Burada hemen hemen t\u00fcm i\u015fletim sistemlerinde var olan HISTORY imdad\u0131m\u0131za yeti\u015fiyor.<\/p>\n<p><code>~$ history<\/code><\/p>\n<p>Bu \u00f6zelli\u011fi komut sat\u0131r\u0131 d\u00fczeyinde \u00e7al\u0131\u015f\u0131yorsan\u0131z bir \u00e7ok kez kullanm\u0131\u015fs\u0131n\u0131zd\u0131r benim gibi.\u0130\u015fin a\u00e7\u0131k\u00e7as\u0131 hi\u00e7 yoksa g\u00fcnde 20 kez history den yararlan\u0131yorum.<\/p>\n<p>Ancak evvelsi g\u00fcn bir s\u0131k\u0131nt\u0131 ya\u015fad\u0131m. Kulland\u0131\u011f\u0131m farenin orta tu\u015fu yap\u0131\u015ft\u0131rma(paste) i\u015fine yar\u0131yor ve haf\u0131zada uzun bir programlama kodu varm\u0131\u015f ve history&#8217;me bu komutlar\u0131n hepsi eklendi ve history i kullanmam mant\u0131ks\u0131zla\u015ft\u0131.<\/p>\n<p><code>~$ history -d sat\u0131r_no <\/code> girerek gereksiz komutlar\u0131 history den silmeyi zaten biliyordum ama onlarca sat\u0131r\u0131 tek tek silmek istemedi\u011fim i\u00e7in<br \/>\n<code> nano ~\/.bash_history<\/code> ile gereksiz sat\u0131rlar\u0131 silmek istedi\u011fimde bir s\u0131k\u0131nt\u0131 ile kar\u015f\u0131la\u015ft\u0131m.Yukar\u0131 ok tu\u015fu ile history de g\u00f6z\u00fcken komutlar bash_history i\u00e7erisinde yoktu.<\/p>\n<p>Biraz ara\u015ft\u0131r\u0131nca \u015funu fark ettim bash_history dosyas\u0131na kulland\u0131\u011f\u0131n\u0131z komutlar\u0131n yaz\u0131lmas\u0131 i\u00e7in kulland\u0131\u011f\u0131n\u0131z terminal ekran\u0131n\u0131 kapatmalas\u0131n\u0131z.Terminal ekran\u0131 kapan\u0131rken cache de tuttu\u011fu history bash_history dosyas\u0131na ekleme(append) yap\u0131yor.<\/p>\n<p>Dolay\u0131s\u0131yla history&#8217;nizi d\u00fczenlemek gibi bir hayaliniz varsa a\u00e7\u0131k terminal b\u0131rakmay\u0131n.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0130\u015fyerimde birden fazla i\u015fletim sistemi ile ha\u015f\u0131r ne\u015fir olmak zorunday\u0131m.Baz\u0131lar\u0131 son kullan\u0131c\u0131 d\u00fczeyindeyken baz\u0131lar\u0131da sunucu d\u00fczeyinde. S\u00fcrekli olarak projelerin pe\u015finde ko\u015ftu\u011fum i\u00e7in farkl\u0131 bir \u00e7ok i\u015fletim sistemlerini denemeye \u00e7al\u0131\u015f\u0131yorum.Bu kadar geni\u015f bir yelpazede \u00e7al\u0131\u015f\u0131yorsan\u0131z bilgi deryas\u0131 i\u00e7erisinde bo\u011fulmaman\u0131z m\u00fcmk\u00fcn de\u011fil. En basitinden bu kadar \u00e7ok par\u00e7aya b\u00f6l\u00fcnd\u00fc\u011f\u00fcn\u00fczde ya\u015fayabilece\u011finiz en basit&#8230;<\/p>\n","protected":false},"author":1,"featured_media":158,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31,4],"tags":[181,183,186,185,182,184,17],"class_list":["post-475","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-sorun-cozumleri","tag-bash_history","tag-command-line","tag-edit-history","tag-fix-history","tag-history","tag-nano","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/posts\/475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/comments?post=475"}],"version-history":[{"count":1,"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/posts\/475\/revisions"}],"predecessor-version":[{"id":476,"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/posts\/475\/revisions\/476"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/media\/158"}],"wp:attachment":[{"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/media?parent=475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/categories?post=475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/melic.com\/wp1\/wp-json\/wp\/v2\/tags?post=475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}