{"id":569,"date":"2025-09-10T12:47:43","date_gmt":"2025-09-10T09:47:43","guid":{"rendered":"https:\/\/destek.narhost.com\/?p=569"},"modified":"2025-10-26T14:21:36","modified_gmt":"2025-10-26T11:21:36","slug":"linux-sed-dosya-icinde-satir-silme","status":"publish","type":"post","link":"https:\/\/narhost.com\/destek\/linux-sed-dosya-icinde-satir-silme\/","title":{"rendered":"Linux Sed Dosya \u0130\u00e7inde Sat\u0131r Silme"},"content":{"rendered":"<p data-start=\"17\" data-end=\"186\">Linux ortamlar\u0131nda dosya i\u00e7inden sat\u0131r silmek i\u00e7in <code data-start=\"68\" data-end=\"73\">sed<\/code> komutunu kullanabilirsiniz. <code data-start=\"102\" data-end=\"106\">-i<\/code> parametresi ile dosya \u00fczerinde do\u011frudan de\u011fi\u015fiklik yap\u0131l\u0131r. \u0130\u015fte baz\u0131 \u00f6rnekler:<\/p>\n<hr data-start=\"188\" data-end=\"191\" \/>\n<p data-start=\"193\" data-end=\"223\"><strong data-start=\"193\" data-end=\"223\">Bo\u015f sat\u0131rlar\u0131 silmek i\u00e7in:<\/strong><\/p>\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\n<div class=\"sticky top-9\">\n<div class=\"absolute end-0 bottom-0 flex h-9 items-center pe-2\">\n<div class=\"bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs\"><\/div>\n<\/div>\n<\/div>\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre! language-bash\">sed -i <span class=\"hljs-string\">'\/^$\/d'<\/span> \/home\/umut\/test.txt<br \/>\n<\/code><\/div>\n<\/div>\n<hr data-start=\"273\" data-end=\"276\" \/>\n<p data-start=\"278\" data-end=\"328\"><strong data-start=\"278\" data-end=\"328\">Belirli sat\u0131r\u0131 silmek i\u00e7in (\u00f6rne\u011fin 3. sat\u0131r):<\/strong><\/p>\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\n<div class=\"sticky top-9\">\n<div class=\"absolute end-0 bottom-0 flex h-9 items-center pe-2\">\n<div class=\"bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs\"><\/div>\n<\/div>\n<\/div>\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre! language-bash\">sed -i <span class=\"hljs-string\">'3d'<\/span> \/home\/teknosos\/test.txt<br \/>\n<\/code><\/div>\n<\/div>\n<hr data-start=\"379\" data-end=\"382\" \/>\n<p data-start=\"384\" data-end=\"476\"><strong data-start=\"384\" data-end=\"476\">\u0130\u00e7inde belirli kelime ge\u00e7en sat\u0131rlar\u0131 silmek i\u00e7in (\u00f6rne\u011fin \u201cvirtualmin\u201d ge\u00e7en sat\u0131rlar):<\/strong><\/p>\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\n<div class=\"sticky top-9\">\n<div class=\"absolute end-0 bottom-0 flex h-9 items-center pe-2\">\n<div class=\"bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs\"><\/div>\n<\/div>\n<\/div>\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre! language-bash\">sed -i <span class=\"hljs-string\">'\/virtualmin\/d'<\/span> \/etc\/apt\/source.list<br \/>\n<\/code><\/div>\n<\/div>\n<hr data-start=\"535\" data-end=\"538\" \/>\n<p data-start=\"540\" data-end=\"640\"><strong data-start=\"540\" data-end=\"640\">Belirli harf veya kelimelerle ba\u015flayan sat\u0131rlar\u0131 silmek i\u00e7in (\u00f6rne\u011fin \u201cubuntu\u201d ile ba\u015flayanlar):<\/strong><\/p>\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\n<div class=\"sticky top-9\">\n<div class=\"absolute end-0 bottom-0 flex h-9 items-center pe-2\">\n<div class=\"bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs\"><\/div>\n<\/div>\n<\/div>\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre! language-bash\">sed -i <span class=\"hljs-string\">'\/^ubuntu\/d'<\/span> \/etc\/apt\/source.list<br \/>\n<\/code><\/div>\n<\/div>\n<hr data-start=\"696\" data-end=\"699\" \/>\n<p data-start=\"701\" data-end=\"795\"><strong data-start=\"701\" data-end=\"795\">Belirli harf veya kelimelerle biten sat\u0131rlar\u0131 silmek i\u00e7in (\u00f6rne\u011fin \u201ccentos\u201d ile bitenler):<\/strong><\/p>\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\n<div class=\"sticky top-9\">\n<div class=\"absolute end-0 bottom-0 flex h-9 items-center pe-2\">\n<div class=\"bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs\"><\/div>\n<\/div>\n<\/div>\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre! language-bash\">sed -i <span class=\"hljs-string\">'\/centos$\/d'<\/span> \/etc\/apt\/source.list<br \/>\n<\/code><\/div>\n<\/div>\n<hr data-start=\"851\" data-end=\"854\" \/>\n<p data-start=\"856\" data-end=\"949\">Bu \u015fekilde <code data-start=\"867\" data-end=\"875\">sed -i<\/code> komutuyla dosyan\u0131z \u00fczerinde h\u0131zl\u0131ca istedi\u011finiz sat\u0131rlar\u0131 silebilirsiniz.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux ortamlar\u0131nda dosya i\u00e7inden sat\u0131r silmek i\u00e7in sed komutunu kullanabilirsiniz. -i parametresi ile dosya \u00fczerinde do\u011frudan de\u011fi\u015fiklik yap\u0131l\u0131r. \u0130\u015fte baz\u0131 \u00f6rnekler<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,13],"tags":[],"class_list":["post-569","post","type-post","status-publish","format-standard","hentry","category-vds-server","category-vps-server"],"meta_box":[],"_links":{"self":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts\/569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/comments?post=569"}],"version-history":[{"count":2,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts\/569\/revisions"}],"predecessor-version":[{"id":749,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts\/569\/revisions\/749"}],"wp:attachment":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/media?parent=569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/categories?post=569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/tags?post=569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}