<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[Forums - 	شروحات و مشاكل الـ VPS و LINUX]]></title>
		<link>https://ftth.kozow.com/</link>
		<description><![CDATA[Forums - https://ftth.kozow.com]]></description>
		<pubDate>Wed, 08 Jul 2026 14:07:01 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[How to Free Up Space From sda1 on Linux]]></title>
			<link>https://ftth.kozow.com/showthread.php?tid=14</link>
			<pubDate>Tue, 02 Dec 2025 02:27:39 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://ftth.kozow.com/member.php?action=profile&uid=2">master-str</a>]]></dc:creator>
			<guid isPermaLink="false">https://ftth.kozow.com/showthread.php?tid=14</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #242424;" class="mycode_color"><span style="font-family: sohne, 'Helvetica Neue', Helvetica, Arial, sans-serif;" class="mycode_font">Solution</span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #242424;" class="mycode_color"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font">After trying many different methods that may work for you, such as running the commands </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>sudo apt autoremove</code></div></div><div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #242424;" class="mycode_color"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> or </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>sudo apt autoclean</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: 1pt;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> , the solution is:</span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font">Run </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>du -hs * | sort -h</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> and the terminal will output all the directories and files of your current directory in ascending order so that you can see which files or directories are taking so much storage. The output will look like this:</span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="color: #000000;" class="mycode_color"><span style="font-family: medium-content-sans-serif-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;" class="mycode_font"><img src="https://miro.medium.com/v2/resize:fit:325/1*lB-nmhCEUFD-w5OmwLhA1A.png" loading="lazy"  width="325" height="362" alt="[صورة: 1*lB-nmhCEUFD-w5OmwLhA1A.png]" class="mycode_img" /></span></span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font">Now you can see which files or directories are taking much space and delete them using </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>rm -rf filename</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> or </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>rm -rf directory_name</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> . I did it and after running </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>df -h</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> again, I now had 88% — instead of 100% — of memory used from the </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>dev/sda1</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> directory. Even though I had deleted <span style="font-weight: bold;" class="mycode_b">many </span>files and directories, it seemed strange to me that something was still occupying so much space. And here comes a powerful tool that solved my problems and of which I knew nothing before running into this issue.</span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: sohne, 'Helvetica Neue', Helvetica, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">NCDU</span></span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font">NCDU shows you which files and directories are taking the most space on the directory you run it — but it shows even the <span style="font-weight: bold;" class="mycode_b">hidden</span> files and directories that the other commands we used so far are unable to show. I did show you the other commands though because finding the big files and deleting them manually helped me to get some space — even if it was only a bit — so that I could install </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>ncdu</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> by running the command </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>sudo apt-get install ncdu</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> . Now, running the command </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>ncdu path</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> will show you what you need to find out — path being the directory you want to inspect, which on my case path was equal to </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>/home/myusername</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> . You will see something like this:</span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="color: #000000;" class="mycode_color"><span style="font-family: medium-content-sans-serif-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;" class="mycode_font"><img src="https://miro.medium.com/v2/resize:fit:482/1*xeepCgVgiq7in2L8V3cYfg.png" loading="lazy"  width="482" height="347" alt="[صورة: 1*xeepCgVgiq7in2L8V3cYfg.png]" class="mycode_img" /></span></span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font">Here we go! After I solved the issue, you can see that anaconda3 takes up the most space, but before solving the issue, </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>.local</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> took about 4GiB of my memory — that is a lot. Also, </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>.cache</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> was a big part of the problem.</span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font">You now only need to remove the biggest files in these directories. I do not recommend removing all of the content inside them at once, but there are different opinions about it over the internet. But make some research so that you will not be doing something damageable for your computer. So, now, just run </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>cd .cache</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> and run </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>du -hs * | sort -h</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> to find which applications’ caches are unnecessarily big. Then, run </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>rm -rf filename</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> where the filename will be the name of the file you want to remove. Also, if </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>.local</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> is taking much space too, run </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>rm -rf ~/.local/share/Trash</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> to remove all the trash that has been saved — if you don't care about them, of course. If the </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>.thumbs/</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> file is also taking much space, run </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>rm -rf ~/.thumbs/*</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> .</span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font">After doing all of this and removing the anaconda files I had before and trying running its installer again, the installation succeed, and now I can use it without any problems.</span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font">Credits to this helpful article on NCDU that was a light for me:</span></span></span></div>]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #242424;" class="mycode_color"><span style="font-family: sohne, 'Helvetica Neue', Helvetica, Arial, sans-serif;" class="mycode_font">Solution</span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #242424;" class="mycode_color"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font">After trying many different methods that may work for you, such as running the commands </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>sudo apt autoremove</code></div></div><div style="text-align: center;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #242424;" class="mycode_color"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> or </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>sudo apt autoclean</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: 1pt;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> , the solution is:</span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font">Run </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>du -hs * | sort -h</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> and the terminal will output all the directories and files of your current directory in ascending order so that you can see which files or directories are taking so much storage. The output will look like this:</span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="color: #000000;" class="mycode_color"><span style="font-family: medium-content-sans-serif-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;" class="mycode_font"><img src="https://miro.medium.com/v2/resize:fit:325/1*lB-nmhCEUFD-w5OmwLhA1A.png" loading="lazy"  width="325" height="362" alt="[صورة: 1*lB-nmhCEUFD-w5OmwLhA1A.png]" class="mycode_img" /></span></span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font">Now you can see which files or directories are taking much space and delete them using </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>rm -rf filename</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> or </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>rm -rf directory_name</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> . I did it and after running </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>df -h</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> again, I now had 88% — instead of 100% — of memory used from the </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>dev/sda1</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> directory. Even though I had deleted <span style="font-weight: bold;" class="mycode_b">many </span>files and directories, it seemed strange to me that something was still occupying so much space. And here comes a powerful tool that solved my problems and of which I knew nothing before running into this issue.</span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: sohne, 'Helvetica Neue', Helvetica, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">NCDU</span></span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font">NCDU shows you which files and directories are taking the most space on the directory you run it — but it shows even the <span style="font-weight: bold;" class="mycode_b">hidden</span> files and directories that the other commands we used so far are unable to show. I did show you the other commands though because finding the big files and deleting them manually helped me to get some space — even if it was only a bit — so that I could install </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>ncdu</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> by running the command </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>sudo apt-get install ncdu</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> . Now, running the command </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>ncdu path</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> will show you what you need to find out — path being the directory you want to inspect, which on my case path was equal to </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>/home/myusername</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> . You will see something like this:</span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="color: #000000;" class="mycode_color"><span style="font-family: medium-content-sans-serif-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;" class="mycode_font"><img src="https://miro.medium.com/v2/resize:fit:482/1*xeepCgVgiq7in2L8V3cYfg.png" loading="lazy"  width="482" height="347" alt="[صورة: 1*xeepCgVgiq7in2L8V3cYfg.png]" class="mycode_img" /></span></span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font">Here we go! After I solved the issue, you can see that anaconda3 takes up the most space, but before solving the issue, </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>.local</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> took about 4GiB of my memory — that is a lot. Also, </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>.cache</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> was a big part of the problem.</span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font">You now only need to remove the biggest files in these directories. I do not recommend removing all of the content inside them at once, but there are different opinions about it over the internet. But make some research so that you will not be doing something damageable for your computer. So, now, just run </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>cd .cache</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> and run </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>du -hs * | sort -h</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> to find which applications’ caches are unnecessarily big. Then, run </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>rm -rf filename</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> where the filename will be the name of the file you want to remove. Also, if </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>.local</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> is taking much space too, run </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>rm -rf ~/.local/share/Trash</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> to remove all the trash that has been saved — if you don't care about them, of course. If the </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>.thumbs/</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> file is also taking much space, run </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>rm -rf ~/.thumbs/*</code></div></div><div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font"> .</span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font">After doing all of this and removing the anaconda files I had before and trying running its installer again, the installation succeed, and now I can use it without any problems.</span></span></span></div>
<div style="text-align: center;" class="mycode_align"><span style="color: #242424;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: source-serif-pro, Georgia, Cambria, 'Times New Roman', Times, serif;" class="mycode_font">Credits to this helpful article on NCDU that was a light for me:</span></span></span></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[reading text character for character script shell]]></title>
			<link>https://ftth.kozow.com/showthread.php?tid=13</link>
			<pubDate>Wed, 05 Nov 2025 18:38:02 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://ftth.kozow.com/member.php?action=profile&uid=1">ftth</a>]]></dc:creator>
			<guid isPermaLink="false">https://ftth.kozow.com/showthread.php?tid=13</guid>
			<description><![CDATA[[left]To read text character by character in a shell script, you can utilize the read command with the -n1 option within a loop. This approach allows processing of a file or input stream one character at a time.[/left]<br />
[left]<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]Example Script:</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=2]Code</span></span>[/size]</span><br />
[center][/center]<br />
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>#!/bin/bash<br />
# Prompt the user to enter a file name<br />
read -p "Enter file name: " filename<br />
# Check if the file exists<br />
if [[ ! -f "&#36;filename" ]]; then<br />
    echo "Error: File '&#36;filename' not found."<br />
    exit 1<br />
fi<br />
echo "Reading characters from '&#36;filename':"<br />
# Loop to read the file character by character<br />
while IFS= read -r -n1 character; do<br />
    # Process each character (e.g., print it)<br />
    echo "Character: '&#36;character'"<br />
done &lt; "&#36;filename"<br />
echo "End of file."</code></div></div><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]Explanation:</span></span>[/size]</span>[/left]<br />
[left][/left]<br />
[left]<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]#!/bin/bash: This is the shebang line, specifying that the script should be executed with Bash.<br />
</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]read -p "Enter file name: " filename: Prompts the user to enter a file name and stores it in the filename variable.</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]if [[ ! -f "&#36;filename" ]]; then ... fi: Checks if the provided file exists. If not, an error message is displayed, and the script exits.</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]while IFS= read -r -n1 character; do ... done &lt; "&#36;filename": This is the core of the character-by-character reading.</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]IFS=: Temporarily clears the Internal Field Separator to prevent word splitting and globbing, ensuring that special characters are read literally.</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]read -r -n1 character:</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]-r: Prevents backslash escapes from being interpreted.</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]-n1: Specifies that read should read exactly one character.</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]character: The variable where the read character will be stored.</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]&lt; "&#36;filename": Redirects the content of the specified file as input to the while loop.</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]echo "Character: '&#36;character'": Inside the loop, this line prints each character that is read. You can replace this with any other processing logic for the character.</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]This script demonstrates a robust method for reading and processing text files character by character in a Bash shell environment.</span></span>[/size]</span>[/left]]]></description>
			<content:encoded><![CDATA[[left]To read text character by character in a shell script, you can utilize the read command with the -n1 option within a loop. This approach allows processing of a file or input stream one character at a time.[/left]<br />
[left]<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]Example Script:</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=2]Code</span></span>[/size]</span><br />
[center][/center]<br />
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>#!/bin/bash<br />
# Prompt the user to enter a file name<br />
read -p "Enter file name: " filename<br />
# Check if the file exists<br />
if [[ ! -f "&#36;filename" ]]; then<br />
    echo "Error: File '&#36;filename' not found."<br />
    exit 1<br />
fi<br />
echo "Reading characters from '&#36;filename':"<br />
# Loop to read the file character by character<br />
while IFS= read -r -n1 character; do<br />
    # Process each character (e.g., print it)<br />
    echo "Character: '&#36;character'"<br />
done &lt; "&#36;filename"<br />
echo "End of file."</code></div></div><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]Explanation:</span></span>[/size]</span>[/left]<br />
[left][/left]<br />
[left]<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]#!/bin/bash: This is the shebang line, specifying that the script should be executed with Bash.<br />
</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]read -p "Enter file name: " filename: Prompts the user to enter a file name and stores it in the filename variable.</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]if [[ ! -f "&#36;filename" ]]; then ... fi: Checks if the provided file exists. If not, an error message is displayed, and the script exits.</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]while IFS= read -r -n1 character; do ... done &lt; "&#36;filename": This is the core of the character-by-character reading.</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]IFS=: Temporarily clears the Internal Field Separator to prevent word splitting and globbing, ensuring that special characters are read literally.</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]read -r -n1 character:</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]-r: Prevents backslash escapes from being interpreted.</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]-n1: Specifies that read should read exactly one character.</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]character: The variable where the read character will be stored.</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]&lt; "&#36;filename": Redirects the content of the specified file as input to the while loop.</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]echo "Character: '&#36;character'": Inside the loop, this line prints each character that is read. You can replace this with any other processing logic for the character.</span></span>[/size]</span><br />
<span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 3pt;" class="mycode_size"><span style="font-family: 'Google Sans', Arial, sans-serif;" class="mycode_font">[size=4]This script demonstrates a robust method for reading and processing text files character by character in a Bash shell environment.</span></span>[/size]</span>[/left]]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[script input_password= in shell script]]></title>
			<link>https://ftth.kozow.com/showthread.php?tid=12</link>
			<pubDate>Tue, 04 Nov 2025 17:38:23 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://ftth.kozow.com/member.php?action=profile&uid=1">ftth</a>]]></dc:creator>
			<guid isPermaLink="false">https://ftth.kozow.com/showthread.php?tid=12</guid>
			<description><![CDATA[<div style="text-align: left;" class="mycode_align">To obtain a password input in a shell script without echoing the characters to the terminal, the read command with the -s option is typically used.</div>
<div style="text-align: left;" class="mycode_align">Here is an example:</div>
<br />
<br />
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>#!/bin/bash<br />
<br />
echo "Enter your password:"<br />
read -s password_variable<br />
echo # Add a newline after silent input<br />
echo "Password has been entered."<br />
<br />
# You can now use &#36;password_variable in your script<br />
# For example:<br />
# echo "The entered password is: &#36;password_variable" # Be cautious with echoing se</code></div></div><div style="text-align: left;" class="mycode_align">Explanation:</div>
<div style="text-align: left;" class="mycode_align">echo "Enter your password:": This line displays a prompt to the user.</div>
<div style="text-align: left;" class="mycode_align">read -s password_variable:</div>
<div style="text-align: left;" class="mycode_align">read: This command reads a line of input from the user.</div>
<div style="text-align: left;" class="mycode_align">-s: This option makes the input silent, meaning the characters typed by the user will not be displayed on the screen.</div>
<div style="text-align: left;" class="mycode_align">password_variable: This is the name of the variable where the entered password will be stored.</div>
<div style="text-align: left;" class="mycode_align">echo: After the silent input, it is good practice to add an echo command to print a newline, ensuring subsequent output starts on a new line.</div>
<div style="text-align: left;" class="mycode_align">Important Security Considerations:</div>
<div style="text-align: left;" class="mycode_align">Avoid storing passwords in plain text: Do not store the entered password directly in files or environment variables if possible, as this poses a security risk.</div>
<div style="text-align: left;" class="mycode_align">Use secure methods for password handling: For more complex scenarios, consider using tools like expect for automating interactions with programs requiring passwords or integrating with secure credential management systems.</div>
<div style="text-align: left;" class="mycode_align">Limit exposure of sensitive information: Be mindful of where and how you use the password_variable to prevent accidental disclosure.</div>]]></description>
			<content:encoded><![CDATA[<div style="text-align: left;" class="mycode_align">To obtain a password input in a shell script without echoing the characters to the terminal, the read command with the -s option is typically used.</div>
<div style="text-align: left;" class="mycode_align">Here is an example:</div>
<br />
<br />
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>#!/bin/bash<br />
<br />
echo "Enter your password:"<br />
read -s password_variable<br />
echo # Add a newline after silent input<br />
echo "Password has been entered."<br />
<br />
# You can now use &#36;password_variable in your script<br />
# For example:<br />
# echo "The entered password is: &#36;password_variable" # Be cautious with echoing se</code></div></div><div style="text-align: left;" class="mycode_align">Explanation:</div>
<div style="text-align: left;" class="mycode_align">echo "Enter your password:": This line displays a prompt to the user.</div>
<div style="text-align: left;" class="mycode_align">read -s password_variable:</div>
<div style="text-align: left;" class="mycode_align">read: This command reads a line of input from the user.</div>
<div style="text-align: left;" class="mycode_align">-s: This option makes the input silent, meaning the characters typed by the user will not be displayed on the screen.</div>
<div style="text-align: left;" class="mycode_align">password_variable: This is the name of the variable where the entered password will be stored.</div>
<div style="text-align: left;" class="mycode_align">echo: After the silent input, it is good practice to add an echo command to print a newline, ensuring subsequent output starts on a new line.</div>
<div style="text-align: left;" class="mycode_align">Important Security Considerations:</div>
<div style="text-align: left;" class="mycode_align">Avoid storing passwords in plain text: Do not store the entered password directly in files or environment variables if possible, as this poses a security risk.</div>
<div style="text-align: left;" class="mycode_align">Use secure methods for password handling: For more complex scenarios, consider using tools like expect for automating interactions with programs requiring passwords or integrating with secure credential management systems.</div>
<div style="text-align: left;" class="mycode_align">Limit exposure of sensitive information: Be mindful of where and how you use the password_variable to prevent accidental disclosure.</div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Passing the file name as a command-line argument]]></title>
			<link>https://ftth.kozow.com/showthread.php?tid=11</link>
			<pubDate>Tue, 04 Nov 2025 17:18:41 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://ftth.kozow.com/member.php?action=profile&uid=1">ftth</a>]]></dc:creator>
			<guid isPermaLink="false">https://ftth.kozow.com/showthread.php?tid=11</guid>
			<description><![CDATA[<div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">How to run the script:</span></span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #001d35;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size">bash</span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>./your_script.sh /path/to/input_file.txt</code></div></div><div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">[b]Inside </span>[/b]</span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>your_script.sh</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">[b]<span style="font-size: large;" class="mycode_size">:</span></span></span></span>[/b]</div>
<div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">You would use the variable </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>&#36;1</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"> to refer to the file path. </span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #001d35;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size">bash</span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>#!/bin/bash<br />
<br />
INPUT_FILE="&#36;1"<br />
<br />
# Check if file was provided and exists<br />
if [ -z "&#36;INPUT_FILE" ]; then<br />
  echo "Usage: &#36;0 &lt;input_file&gt;"<br />
  exit 1<br />
fi<br />
<br />
if [ ! -f "&#36;INPUT_FILE" ]; then<br />
  echo "Error: File not found at &#36;INPUT_FILE"<br />
  exit 1<br />
fi<br />
<br />
# Example: Read the file line by line<br />
while IFS= read -r line; do<br />
  echo "Next line: &#36;line"<br />
done &lt; "&#36;INPUT_FILE"</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">Redirecting the file content to standard input</span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">The script reads directly from its standard input (stdin), which the shell connects to the file's content using the </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>&lt;</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"> operator. </span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">[b]How to run the script:</span>[/b]</span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #001d35;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size">bash</span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>./your_script.sh &lt; /path/to/input_file.txt</code></div></div><div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">[b]Inside </span>[/b]</span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>your_script.sh</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">[b]<span style="font-size: large;" class="mycode_size">:</span></span></span></span>[/b]</div>
<div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">The script uses commands that read from stdin, such as </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>read</code></div></div><div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">, </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>cat</code></div></div><div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">, </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>grep</code></div></div><div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">, </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>tr</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">, etc. </span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #001d35;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size">bash</span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>#!/bin/bash<br />
<br />
# Example: Read from standard input line by line<br />
while IFS= read -r line; do<br />
  echo "Next line: &#36;line"<br />
done<br />
# The loop reads from stdin because no redirection is specified in the while command itself.<br />
<br />
# Alternatively, other commands can use stdin directly:<br />
# tr 'a-z' 'A-Z' # This would convert all input to uppercase</code></div></div><div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">3. Using custom argument parsing (for </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>input_file=</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">)</span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">If you want to use the specific </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>input_file=</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"> format as in your example, you need to parse the arguments manually within your script.</span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">[b]How to run the script:</span>[/b]</span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #001d35;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size">bash</span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>./your_script.sh input_file=/path/to/file.txt</code></div></div><div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">[b]Inside </span>[/b]</span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>your_script.sh</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">[b]:</span>[/b]</span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #001d35;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size">bash</span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>#!/bin/bash<br />
<br />
for arg in "&#36;@"; do<br />
  case "&#36;arg" in<br />
    input_file=*)<br />
      INPUT_FILE="&#36;{arg#*=}" # Extract the value after the '='<br />
      ;;<br />
    *)<br />
      # Handle other arguments or errors<br />
      ;;<br />
  esac<br />
done<br />
<br />
# Now you can use &#36;INPUT_FILE as in Method 1<br />
if [ -f "&#36;INPUT_FILE" ]; then<br />
  echo "Processing file: &#36;INPUT_FILE"<br />
  # ... processing code here ...<br />
else<br />
  echo "Error: File not found or not specified."<br />
fi</code></div></div>]]></description>
			<content:encoded><![CDATA[<div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">How to run the script:</span></span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #001d35;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size">bash</span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>./your_script.sh /path/to/input_file.txt</code></div></div><div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">[b]Inside </span>[/b]</span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>your_script.sh</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">[b]<span style="font-size: large;" class="mycode_size">:</span></span></span></span>[/b]</div>
<div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">You would use the variable </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>&#36;1</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"> to refer to the file path. </span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #001d35;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size">bash</span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>#!/bin/bash<br />
<br />
INPUT_FILE="&#36;1"<br />
<br />
# Check if file was provided and exists<br />
if [ -z "&#36;INPUT_FILE" ]; then<br />
  echo "Usage: &#36;0 &lt;input_file&gt;"<br />
  exit 1<br />
fi<br />
<br />
if [ ! -f "&#36;INPUT_FILE" ]; then<br />
  echo "Error: File not found at &#36;INPUT_FILE"<br />
  exit 1<br />
fi<br />
<br />
# Example: Read the file line by line<br />
while IFS= read -r line; do<br />
  echo "Next line: &#36;line"<br />
done &lt; "&#36;INPUT_FILE"</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">Redirecting the file content to standard input</span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">The script reads directly from its standard input (stdin), which the shell connects to the file's content using the </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>&lt;</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"> operator. </span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">[b]How to run the script:</span>[/b]</span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #001d35;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size">bash</span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>./your_script.sh &lt; /path/to/input_file.txt</code></div></div><div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">[b]Inside </span>[/b]</span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>your_script.sh</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">[b]<span style="font-size: large;" class="mycode_size">:</span></span></span></span>[/b]</div>
<div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">The script uses commands that read from stdin, such as </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>read</code></div></div><div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">, </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>cat</code></div></div><div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">, </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>grep</code></div></div><div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">, </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>tr</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">, etc. </span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #001d35;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size">bash</span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>#!/bin/bash<br />
<br />
# Example: Read from standard input line by line<br />
while IFS= read -r line; do<br />
  echo "Next line: &#36;line"<br />
done<br />
# The loop reads from stdin because no redirection is specified in the while command itself.<br />
<br />
# Alternatively, other commands can use stdin directly:<br />
# tr 'a-z' 'A-Z' # This would convert all input to uppercase</code></div></div><div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">3. Using custom argument parsing (for </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>input_file=</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">)</span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">If you want to use the specific </span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>input_file=</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"> format as in your example, you need to parse the arguments manually within your script.</span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">[b]How to run the script:</span>[/b]</span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #001d35;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size">bash</span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>./your_script.sh input_file=/path/to/file.txt</code></div></div><div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">[b]Inside </span>[/b]</span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>your_script.sh</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">[b]:</span>[/b]</span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #001d35;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size">bash</span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>#!/bin/bash<br />
<br />
for arg in "&#36;@"; do<br />
  case "&#36;arg" in<br />
    input_file=*)<br />
      INPUT_FILE="&#36;{arg#*=}" # Extract the value after the '='<br />
      ;;<br />
    *)<br />
      # Handle other arguments or errors<br />
      ;;<br />
  esac<br />
done<br />
<br />
# Now you can use &#36;INPUT_FILE as in Method 1<br />
if [ -f "&#36;INPUT_FILE" ]; then<br />
  echo "Processing file: &#36;INPUT_FILE"<br />
  # ... processing code here ...<br />
else<br />
  echo "Error: File not found or not specified."<br />
fi</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Encrypting a file line by line]]></title>
			<link>https://ftth.kozow.com/showthread.php?tid=10</link>
			<pubDate>Tue, 04 Nov 2025 16:52:16 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://ftth.kozow.com/member.php?action=profile&uid=1">ftth</a>]]></dc:creator>
			<guid isPermaLink="false">https://ftth.kozow.com/showthread.php?tid=10</guid>
			<description><![CDATA[<div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">Encrypting a file line by line </span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-size: large;" class="mycode_size">You can use a Bash loop to process the file line by line. This example uses </span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">How to run the script:</span></span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #001d35;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size">bash</span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>./Encryptinglinebyline.sh /path/to/input_file.txt</code></div></div><div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">bash</span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>#!/bin/bash<br />
<br />
#INPUT_FILE="/path/to/file.txt"<br />
<br />
# Example: Read the file line by line  ./your_script.sh /path/to/input_file.txt<br />
<br />
INPUT_FILE="&#36;1"<br />
<br />
# Check if file was provided and exists<br />
if [ -z "&#36;INPUT_FILE" ]; then<br />
  echo "Usage: &#36;0 &lt;input_file&gt;"<br />
  exit 1<br />
fi<br />
<br />
if [ ! -f "&#36;INPUT_FILE" ]; then<br />
  echo "Error: File not found at &#36;INPUT_FILE"<br />
  exit 1<br />
fi<br />
OUTPUT_FILE="encrypted.txt"<br />
PASSPHRASE="your_secret_password" # Replace with your actual password<br />
<br />
&gt; "&#36;OUTPUT_FILE" # Clear the output file<br />
<br />
while IFS= read -r line<br />
do<br />
  # Skip empty lines if necessary<br />
  if [ -z "&#36;line" ]; then<br />
    continue<br />
  fi<br />
  # Encrypt the line and append to the output file<br />
  echo "&#36;line" | openssl enc -aes-256-cbc -a -salt -pbkdf2 -pass pass:"&#36;PASSPHRASE" &gt;&gt; "&#36;OUTPUT_FILE"<br />
done &lt; "&#36;INPUT_FILE"<br />
<br />
echo "Encryption complete. Encrypted data saved to &#36;OUTPUT_FILE"</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">Decrypting the file line by line</span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">The decryption process also involves reading each line of the encrypted file and decrypting it individually.  </span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">bash</span></span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>#!/bin/bash<br />
<br />
 #INPUT_FILE="/path/to/file_encrypted.txt"<br />
<br />
# Example: Read the file line by line  ./your_script.sh /path/to/input_file.txt<br />
<br />
INPUT_FILE="&#36;1"<br />
<br />
# Check if file was provided and exists<br />
if [ -z "&#36;INPUT_FILE" ]; then<br />
  echo "Usage: &#36;0 &lt;input_file&gt;"<br />
  exit 1<br />
fi<br />
<br />
if [ ! -f "&#36;INPUT_FILE" ]; then<br />
  echo "Error: File not found at &#36;INPUT_FILE"<br />
  exit 1<br />
fi <br />
OUTPUT_FILE="decrypted.txt"<br />
PASSPHRASE="your_secret_password" # Use the same password used for encryption<br />
<br />
&gt; "&#36;OUTPUT_FILE" # Clear the output file<br />
<br />
while IFS= read -r line<br />
do<br />
  # Decrypt the line and append to the output file<br />
  echo "&#36;line" | openssl enc -d -aes-256-cbc -a -salt -pbkdf2 -pass pass:"&#36;PASSPHRASE" &gt;&gt; "&#36;OUTPUT_FILE"<br />
done &lt; "&#36;INPUT_FILE"<br />
<br />
echo "Decryption complete. Decrypted data saved to &#36;OUTPUT_FILE"</code></div></div><div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">Alternative: Encrypting the entire file at once </span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="font-size: 1pt;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">For most standard use cases, it is much simpler and more efficient to encrypt the entire file using a single OpenSSL command: </span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">[b]Encryption:</span>[/b]</span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #001d35;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color">bash</span></span></span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>openssl enc -aes-256-cbc -salt -pbkdf2 -a -e -in plaintext.txt -out encrypted.txt</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">[b]Decryption:</span>[/b]</span></span></span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #001d35;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size">bash</span></span></span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>openssl enc -d -aes-256-cbc -salt -pbkdf2 -a -in encrypted.txt -out decrypted.txt</code></div></div>]]></description>
			<content:encoded><![CDATA[<div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">Encrypting a file line by line </span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-size: large;" class="mycode_size">You can use a Bash loop to process the file line by line. This example uses </span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">How to run the script:</span></span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #001d35;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size">bash</span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>./Encryptinglinebyline.sh /path/to/input_file.txt</code></div></div><div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">bash</span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>#!/bin/bash<br />
<br />
#INPUT_FILE="/path/to/file.txt"<br />
<br />
# Example: Read the file line by line  ./your_script.sh /path/to/input_file.txt<br />
<br />
INPUT_FILE="&#36;1"<br />
<br />
# Check if file was provided and exists<br />
if [ -z "&#36;INPUT_FILE" ]; then<br />
  echo "Usage: &#36;0 &lt;input_file&gt;"<br />
  exit 1<br />
fi<br />
<br />
if [ ! -f "&#36;INPUT_FILE" ]; then<br />
  echo "Error: File not found at &#36;INPUT_FILE"<br />
  exit 1<br />
fi<br />
OUTPUT_FILE="encrypted.txt"<br />
PASSPHRASE="your_secret_password" # Replace with your actual password<br />
<br />
&gt; "&#36;OUTPUT_FILE" # Clear the output file<br />
<br />
while IFS= read -r line<br />
do<br />
  # Skip empty lines if necessary<br />
  if [ -z "&#36;line" ]; then<br />
    continue<br />
  fi<br />
  # Encrypt the line and append to the output file<br />
  echo "&#36;line" | openssl enc -aes-256-cbc -a -salt -pbkdf2 -pass pass:"&#36;PASSPHRASE" &gt;&gt; "&#36;OUTPUT_FILE"<br />
done &lt; "&#36;INPUT_FILE"<br />
<br />
echo "Encryption complete. Encrypted data saved to &#36;OUTPUT_FILE"</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">Decrypting the file line by line</span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">The decryption process also involves reading each line of the encrypted file and decrypting it individually.  </span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">bash</span></span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>#!/bin/bash<br />
<br />
 #INPUT_FILE="/path/to/file_encrypted.txt"<br />
<br />
# Example: Read the file line by line  ./your_script.sh /path/to/input_file.txt<br />
<br />
INPUT_FILE="&#36;1"<br />
<br />
# Check if file was provided and exists<br />
if [ -z "&#36;INPUT_FILE" ]; then<br />
  echo "Usage: &#36;0 &lt;input_file&gt;"<br />
  exit 1<br />
fi<br />
<br />
if [ ! -f "&#36;INPUT_FILE" ]; then<br />
  echo "Error: File not found at &#36;INPUT_FILE"<br />
  exit 1<br />
fi <br />
OUTPUT_FILE="decrypted.txt"<br />
PASSPHRASE="your_secret_password" # Use the same password used for encryption<br />
<br />
&gt; "&#36;OUTPUT_FILE" # Clear the output file<br />
<br />
while IFS= read -r line<br />
do<br />
  # Decrypt the line and append to the output file<br />
  echo "&#36;line" | openssl enc -d -aes-256-cbc -a -salt -pbkdf2 -pass pass:"&#36;PASSPHRASE" &gt;&gt; "&#36;OUTPUT_FILE"<br />
done &lt; "&#36;INPUT_FILE"<br />
<br />
echo "Decryption complete. Decrypted data saved to &#36;OUTPUT_FILE"</code></div></div><div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">Alternative: Encrypting the entire file at once </span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="font-size: 1pt;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font">For most standard use cases, it is much simpler and more efficient to encrypt the entire file using a single OpenSSL command: </span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">[b]Encryption:</span>[/b]</span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #001d35;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color">bash</span></span></span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>openssl enc -aes-256-cbc -salt -pbkdf2 -a -e -in plaintext.txt -out encrypted.txt</code></div></div><div style="text-align: left;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">[b]Decryption:</span>[/b]</span></span></span></span></span></div>
<div style="text-align: left;" class="mycode_align"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #001d35;" class="mycode_color"><span style="font-family: 'Google Sans', Roboto, Arial, sans-serif;" class="mycode_font"><span style="color: #0a0a0a;" class="mycode_color"><span style="font-size: large;" class="mycode_size">bash</span></span></span></span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>openssl enc -d -aes-256-cbc -salt -pbkdf2 -a -in encrypted.txt -out decrypted.txt</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[OpenSSL Webterm]]></title>
			<link>https://ftth.kozow.com/showthread.php?tid=9</link>
			<pubDate>Tue, 28 Oct 2025 06:51:04 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://ftth.kozow.com/member.php?action=profile&uid=2">master-str</a>]]></dc:creator>
			<guid isPermaLink="false">https://ftth.kozow.com/showthread.php?tid=9</guid>
			<description><![CDATA[image<br />
<img src="https://user-images.githubusercontent.com/9321076/157410455-686ce0de-335f-4335-a639-07b6963e4589.png" loading="lazy"  alt="[صورة: 157410455-686ce0de-335f-4335-a639-07b6963e4589.png]" class="mycode_img" /><br />
Installation<br />
First, install Node.js and npm. Then clone this project and install its dependencies:<br />
<br />
&#36; git clone <a href="https://github.com/cryptool-org/openssl-webterm.git" target="_blank" rel="noopener" class="mycode_url">https://github.com/cryptool-org/openssl-webterm.git</a><br />
&#36; cd openssl-webterm<br />
&#36; npm install<br />
Then start a Webpack development server:<br />
<br />
&#36; npm run serve<br />
<br />
You can now view the OpenSSL Webterm at <a href="https://localhost:4200" target="_blank" rel="noopener" class="mycode_url">https://localhost:4200</a>.<br />
<br />
الموقع الرسمي<br />
<a href="https://github.com/cryptool-org/openssl-webterm?tab=readme-ov-file" target="_blank" rel="noopener" class="mycode_url">https://github.com/cryptool-org/openssl-...me-ov-file</a><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://ftth.kozow.com/images/attachtypes/zip.png" title="ZIP File" border="0" alt=".zip" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=9" target="_blank" title="">openssl-webterm-master.zip</a> (الحجم: 1.5 MB / التحميلات: 0)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[image<br />
<img src="https://user-images.githubusercontent.com/9321076/157410455-686ce0de-335f-4335-a639-07b6963e4589.png" loading="lazy"  alt="[صورة: 157410455-686ce0de-335f-4335-a639-07b6963e4589.png]" class="mycode_img" /><br />
Installation<br />
First, install Node.js and npm. Then clone this project and install its dependencies:<br />
<br />
&#36; git clone <a href="https://github.com/cryptool-org/openssl-webterm.git" target="_blank" rel="noopener" class="mycode_url">https://github.com/cryptool-org/openssl-webterm.git</a><br />
&#36; cd openssl-webterm<br />
&#36; npm install<br />
Then start a Webpack development server:<br />
<br />
&#36; npm run serve<br />
<br />
You can now view the OpenSSL Webterm at <a href="https://localhost:4200" target="_blank" rel="noopener" class="mycode_url">https://localhost:4200</a>.<br />
<br />
الموقع الرسمي<br />
<a href="https://github.com/cryptool-org/openssl-webterm?tab=readme-ov-file" target="_blank" rel="noopener" class="mycode_url">https://github.com/cryptool-org/openssl-...me-ov-file</a><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://ftth.kozow.com/images/attachtypes/zip.png" title="ZIP File" border="0" alt=".zip" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=9" target="_blank" title="">openssl-webterm-master.zip</a> (الحجم: 1.5 MB / التحميلات: 0)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Download Node.js®]]></title>
			<link>https://ftth.kozow.com/showthread.php?tid=8</link>
			<pubDate>Tue, 28 Oct 2025 06:49:00 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://ftth.kozow.com/member.php?action=profile&uid=2">master-str</a>]]></dc:creator>
			<guid isPermaLink="false">https://ftth.kozow.com/showthread.php?tid=8</guid>
			<description><![CDATA[# Download and install nvm:<br />
curl -o- <a href="https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh" target="_blank" rel="noopener" class="mycode_url">https://raw.githubusercontent.com/nvm-sh...install.sh</a> | bash<br />
<br />
# in lieu of restarting the shell<br />
\. "&#36;HOME/.nvm/nvm.sh"<br />
<br />
# Download and install Node.js:<br />
nvm install 22<br />
<br />
# Verify the Node.js version:<br />
node -v # Should print "v22.21.0".<br />
<br />
# Verify npm version:<br />
npm -v # Should pr<br />
<br />
int "10.9.4".<br />
<br />
الموقع الرسمي <br />
<a href="https://nodejs.org/en/download" target="_blank" rel="noopener" class="mycode_url">https://nodejs.org/en/download</a>]]></description>
			<content:encoded><![CDATA[# Download and install nvm:<br />
curl -o- <a href="https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh" target="_blank" rel="noopener" class="mycode_url">https://raw.githubusercontent.com/nvm-sh...install.sh</a> | bash<br />
<br />
# in lieu of restarting the shell<br />
\. "&#36;HOME/.nvm/nvm.sh"<br />
<br />
# Download and install Node.js:<br />
nvm install 22<br />
<br />
# Verify the Node.js version:<br />
node -v # Should print "v22.21.0".<br />
<br />
# Verify npm version:<br />
npm -v # Should pr<br />
<br />
int "10.9.4".<br />
<br />
الموقع الرسمي <br />
<a href="https://nodejs.org/en/download" target="_blank" rel="noopener" class="mycode_url">https://nodejs.org/en/download</a>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[OpenSSL to Encrypt Messages and Files on Linux]]></title>
			<link>https://ftth.kozow.com/showthread.php?tid=7</link>
			<pubDate>Sun, 26 Oct 2025 03:36:39 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://ftth.kozow.com/member.php?action=profile&uid=2">master-str</a>]]></dc:creator>
			<guid isPermaLink="false">https://ftth.kozow.com/showthread.php?tid=7</guid>
			<description><![CDATA[<span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: Oswald, sans-serif;" class="mycode_font">استخدام OpenSSL لتشفير الرسائل والملفات على Linux</span></span></span><br />
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b"><span style="color: #9c5e00;" class="mycode_color">[b]في هذا البرنامج التعليمي سوف تتعلم:</span></span>[/b]</span></span></span></div><ul class="mycode_list"><li><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">كيفية تشفير رسالة باستخدام OpenSSL</span></span></span><br />
</li>
<li><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">كيفية فك تشفير رسالة مشفرة باستخدام OpenSSL</span></span></span><br />
</li>
<li><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">كيفية تشفير ملف باستخدام OpenSSL</span></span></span><br />
</li>
<li><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">كيفية فك تشفير ملف مشفر باستخدام OpenSSL</span></span></span><br />
</li>
<li><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">خوارزميات التشفير المختلفة المتوفرة في OpenSSL</span></span></span><br />
</li>
</ul>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><img src="https://linuxconfig.org/wp-content/uploads/2016/04/00-using-openssl-to-encrypt-messages-and-files-on-linux.avif" loading="lazy"  width="1200" height="686" alt="[صورة: 00-using-openssl-to-encrypt-messages-and...linux.avif]" class="mycode_img" />استخدام OpenSSL لتشفير الرسائل والملفات على Linux</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">متطلبات البرمجيات واتفاقيات سطر أوامر لينكس</span></span><span style="color: #ffffff;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">فئة</span></span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #000000;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">المتطلبات أو الاتفاقيات أو إصدار البرنامج المستخدم</span></span><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">نظام</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">نظام لينكس</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-size: large;" class="mycode_size">برم</span><span style="font-size: medium;" class="mycode_size">جة</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">أوبن إس إس إل</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">آخر</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">المعرفة الأساسية بسطر أوامر لينكس</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">الاتفاقيات</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">[b][b]#</span>[/b] – يتطلب تنفيذ <a href="https://linuxconfig.org/linux-commands" target="_blank" rel="noopener" class="mycode_url"><span style="color: #3498db;" class="mycode_color">أوامر لينكس</span></a> المحددة باستخدام امتيازات الجذر إما بشكل مباشر كمستخدم جذر أو باستخدام [/b]</span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>sudo</code></div></div><div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">الأمر</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">[b]&#36;</span></span></span>[/b]<span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"> – يتطلب تنفيذ </span></span><a href="https://linuxconfig.org/linux-commands" target="_blank" rel="noopener" class="mycode_url"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="color: #3498db;" class="mycode_color">أوامر لينكس المحددة كمستخدم عادي غير ذي امتيازات</span></span></a></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: Oswald, sans-serif;" class="mycode_font">تشفير الرسائل والملفات باستخدام OpenSSL</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">يوفر OpenSSL مجموعة متنوعة من خوارزميات التشفير لتأمين الرسائل والملفات. تتيح هذه المرونة للمستخدمين اختيار الطريقة الأنسب لاحتياجاتهم الخاصة. فيما يلي خمس طرق لتشفير البيانات وفك تشفيرها باستخدام OpenSSL.</span></span></span></div>
<ol type="1" class="mycode_list"><li><div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="color: #9c5e00;" class="mycode_color">[b]تشفير رسالة بكلمة مرور</span></span></span></span>[/b]<span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"> : تُشفّر هذه الطريقة الرسالة باستخدام كلمة مرور، وهي مطلوبة لفك تشفيرها. يُنصح باستخدام `-pbkdf2` لمزيد من الأمان.</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Courier New', Courier, monospace, sans-serif;" class="mycode_font">&#36; echo "LinuxConfig.org" | openssl enc -aes-256-cbc -a -salt -pbkdf2 -pass pass:mysecretpassword</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Courier New', Courier, monospace, sans-serif;" class="mycode_font">U2FsdGVkX19W9lxb8u93hvzRYaTr7rh8Pn6gOKzGJaMjjcQeIcR+PfIKLavho9qF</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">يستخدم هذا الأمر خوارزمية التشفير AES-256-CBC لتشفير رسالة "LinuxConfig.org". يضمن الرمز `-a` ترميز المخرجات بتنسيق base64، مما يُسهّل التعامل معها كسلسلة نصية. يُوصى باستخدام الرمز `-pbkdf2` لتحسين أمان اشتقاق المفتاح.</span></span></span></div>
</li>
<li><div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="color: #9c5e00;" class="mycode_color">[b]فك تشفير رسالة باستخدام كلمة المرور</span></span></span></span>[/b]<span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"> : تقوم هذه الطريقة بفك تشفير الرسالة المشفرة في الخطوة السابقة باستخدام نفس كلمة المرور.</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Courier New', Courier, monospace, sans-serif;" class="mycode_font">&#36; echo "U2FsdGVkX1/POwwfJq2VK3mqDqFO1Ttfuc+q8UuvoQ4Z0F2byx1uNI3NSjeipkAi" | openssl enc -aes-256-cbc -a -d -salt -pbkdf2 -pass pass:mysecretpassword</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">استبدل "U2FsdGVkX1/POwwfJq2VK3mqDqFO1Ttfuc+q8UuvoQ4Z0F2byx1uNI3NSjeipkAi" بالرسالة المشفرة الفعلية. يشير الرمز `-d` إلى فك التشفير.</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-size: large;" class="mycode_size"><img src="https://linuxconfig.org/wp-content/uploads/2016/04/01-using-openssl-to-encrypt-messages-and-files-on-linux.avif" loading="lazy"  width="1128" height="193" alt="[صورة: 01-using-openssl-to-encrypt-messages-and...linux.avif]" class="mycode_img" /></span><span style="font-size: large;" class="mycode_size">تشفير وفك تشفير الرسالة باستخدام كلمة مرور</span></span></span></div>
</li>
<li><div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="color: #9c5e00;" class="mycode_color">[b]تشفير ملف باستخدام كلمة مرور</span></span></span></span>[/b]<span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"> : تقوم هذه الطريقة بتشفير محتويات الملف باستخدام كلمة مرور.</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Courier New', Courier, monospace, sans-serif;" class="mycode_font">&#36; openssl enc -aes-256-cbc -salt -pbkdf2 -in mydata.txt -out mydata.txt.enc -pass pass:mysecretpassword</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">يقوم هذا الأمر بقراءة الملف `mydata.txt`، ويقوم بتشفير محتوياته باستخدام AES-256-CBC، ثم يكتب البيانات المشفرة في `mydata.txt.enc`.</span></span></span></div>
<hr class="mycode_hr" />
<hr class="mycode_hr" />
</li>
<li><div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="color: #9c5e00;" class="mycode_color">[b]فك تشفير ملف باستخدام كلمة مرور</span></span></span></span>[/b]<span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"> : تقوم هذه الطريقة بفك تشفير الملف المشفر في الخطوة السابقة باستخدام نفس كلمة المرور.</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Courier New', Courier, monospace, sans-serif;" class="mycode_font">&#36; openssl enc -aes-256-cbc -d -salt -pbkdf2 -in mydata.txt.enc -out mydata.txt -pass pass:mysecretpassword</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">يقوم هذا الأمر بقراءة الملف المشفر `mydata.txt.enc`، وفك تشفير محتوياته، وكتابة البيانات الأصلية مرة أخرى في `mydata.txt`.</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-size: large;" class="mycode_size"><img src="https://linuxconfig.org/wp-content/uploads/2016/04/02-using-openssl-to-encrypt-messages-and-files-on-linux.avif" loading="lazy"  width="1124" height="324" alt="[صورة: 02-using-openssl-to-encrypt-messages-and...linux.avif]" class="mycode_img" /></span><span style="font-size: large;" class="mycode_size">تشفير وفك تشفير ملف باستخدام كلمة مرور</span></span></span></div>
</li>
<li><div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="color: #9c5e00;" class="mycode_color">[b]التشفير وفك التشفير باستخدام زوج مفاتيح عام/خاص</span></span></span></span>[/b]<span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"> : تتضمن هذه الطريقة تشفير رسالة بمفتاح عام وفك تشفيرها بمفتاح خاص مماثل.</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">إنشاء زوج مفاتيح:</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-family: 'Courier New', Courier, monospace, sans-serif;" class="mycode_font">&#36; openssl genpkey -algorithm RSA -out private_key.pem -aes256</span></span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Courier New', Courier, monospace, sans-serif;" class="mycode_font">&#36; openssl rsa -pubout -in private_key.pem -out public_key.pem</span></span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-size: large;" class="mycode_size"><img src="https://linuxconfig.org/wp-content/uploads/2016/04/03-using-openssl-to-encrypt-messages-and-files-on-linux.avif" loading="lazy"  width="1130" height="659" alt="[صورة: 03-using-openssl-to-encrypt-messages-and...linux.avif]" class="mycode_img" /></span><span style="font-size: large;" class="mycode_size">إنشاء زوج مفاتيح SSL</span></span></span></div>
<br />
<br />
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">تشفير الرسالة:</span></span></span></div>
<br />
<br />
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-family: 'Courier New', Courier, monospace, sans-serif;" class="mycode_font">&#36; echo "LinuxConfig.org" | openssl pkeyutl -encrypt -pubin -inkey public_key.pem -out encrypted_message.bin</span></span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">فك تشفير الرسالة:</span></span></span></div>
<br />
<br />
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-family: 'Courier New', Courier, monospace, sans-serif;" class="mycode_font">&#36; openssl pkeyutl -decrypt -inkey private_key.pem -in encrypted_message.bin</span></span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-size: large;" class="mycode_size">في هذه ال</span><span style="font-size: large;" class="mycode_size">طريقة، يتم تشفير الرسالة بالمفتاح العام ولا يمكن فك تشفيرها إلا بالمفتاح الخاص المقابل، مما يضمن الاتصال الآمن.</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-size: large;" class="mycode_size"><img src="https://linuxconfig.org/wp-content/uploads/2016/04/04-using-openssl-to-encrypt-messages-and-files-on-linux.avif" loading="lazy"  width="1130" height="156" alt="[صورة: 04-using-openssl-to-encrypt-messages-and...linux.avif]" class="mycode_img" /></span><span style="font-size: large;" class="mycode_size">تشفير وفك تشفير الرسائل باستخدام أزواج مفاتيح OpenSSL.</span></span></span></div>
</li>
</ol>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: Oswald, sans-serif;" class="mycode_font">خاتمة</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-size: large;" class="mycode_size">يوفر OpenSSL أدوات </span><span style="font-size: medium;" class="mycode_size">فعّالة لتشفير وفك تشفير الرسائل والملفات على نظام Linux. بإتقان هذه الأساليب، يمكنك تعزيز أمان بياناتك بشكل ملحوظ. سواء كنت تفضل التشفير بكلمة مرور أو الأمان القوي لأزواج المفاتيح العامة/الخاصة، فإن OpenSSL لديه الإمكانيات اللازمة لتلبية احتياجاتك من التشفير.</span></span></span></div>]]></description>
			<content:encoded><![CDATA[<span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: Oswald, sans-serif;" class="mycode_font">استخدام OpenSSL لتشفير الرسائل والملفات على Linux</span></span></span><br />
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b"><span style="color: #9c5e00;" class="mycode_color">[b]في هذا البرنامج التعليمي سوف تتعلم:</span></span>[/b]</span></span></span></div><ul class="mycode_list"><li><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">كيفية تشفير رسالة باستخدام OpenSSL</span></span></span><br />
</li>
<li><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">كيفية فك تشفير رسالة مشفرة باستخدام OpenSSL</span></span></span><br />
</li>
<li><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">كيفية تشفير ملف باستخدام OpenSSL</span></span></span><br />
</li>
<li><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">كيفية فك تشفير ملف مشفر باستخدام OpenSSL</span></span></span><br />
</li>
<li><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">خوارزميات التشفير المختلفة المتوفرة في OpenSSL</span></span></span><br />
</li>
</ul>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><img src="https://linuxconfig.org/wp-content/uploads/2016/04/00-using-openssl-to-encrypt-messages-and-files-on-linux.avif" loading="lazy"  width="1200" height="686" alt="[صورة: 00-using-openssl-to-encrypt-messages-and...linux.avif]" class="mycode_img" />استخدام OpenSSL لتشفير الرسائل والملفات على Linux</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">متطلبات البرمجيات واتفاقيات سطر أوامر لينكس</span></span><span style="color: #ffffff;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">فئة</span></span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #000000;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">المتطلبات أو الاتفاقيات أو إصدار البرنامج المستخدم</span></span><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">نظام</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">نظام لينكس</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-size: large;" class="mycode_size">برم</span><span style="font-size: medium;" class="mycode_size">جة</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">أوبن إس إس إل</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">آخر</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">المعرفة الأساسية بسطر أوامر لينكس</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">الاتفاقيات</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">[b][b]#</span>[/b] – يتطلب تنفيذ <a href="https://linuxconfig.org/linux-commands" target="_blank" rel="noopener" class="mycode_url"><span style="color: #3498db;" class="mycode_color">أوامر لينكس</span></a> المحددة باستخدام امتيازات الجذر إما بشكل مباشر كمستخدم جذر أو باستخدام [/b]</span></span></span></div>
<div class="codeblock"><div class="title">كود:</div><div class="body" dir="ltr"><code>sudo</code></div></div><div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">الأمر</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">[b]&#36;</span></span></span>[/b]<span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"> – يتطلب تنفيذ </span></span><a href="https://linuxconfig.org/linux-commands" target="_blank" rel="noopener" class="mycode_url"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="color: #3498db;" class="mycode_color">أوامر لينكس المحددة كمستخدم عادي غير ذي امتيازات</span></span></a></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: Oswald, sans-serif;" class="mycode_font">تشفير الرسائل والملفات باستخدام OpenSSL</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">يوفر OpenSSL مجموعة متنوعة من خوارزميات التشفير لتأمين الرسائل والملفات. تتيح هذه المرونة للمستخدمين اختيار الطريقة الأنسب لاحتياجاتهم الخاصة. فيما يلي خمس طرق لتشفير البيانات وفك تشفيرها باستخدام OpenSSL.</span></span></span></div>
<ol type="1" class="mycode_list"><li><div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="color: #9c5e00;" class="mycode_color">[b]تشفير رسالة بكلمة مرور</span></span></span></span>[/b]<span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"> : تُشفّر هذه الطريقة الرسالة باستخدام كلمة مرور، وهي مطلوبة لفك تشفيرها. يُنصح باستخدام `-pbkdf2` لمزيد من الأمان.</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Courier New', Courier, monospace, sans-serif;" class="mycode_font">&#36; echo "LinuxConfig.org" | openssl enc -aes-256-cbc -a -salt -pbkdf2 -pass pass:mysecretpassword</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Courier New', Courier, monospace, sans-serif;" class="mycode_font">U2FsdGVkX19W9lxb8u93hvzRYaTr7rh8Pn6gOKzGJaMjjcQeIcR+PfIKLavho9qF</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">يستخدم هذا الأمر خوارزمية التشفير AES-256-CBC لتشفير رسالة "LinuxConfig.org". يضمن الرمز `-a` ترميز المخرجات بتنسيق base64، مما يُسهّل التعامل معها كسلسلة نصية. يُوصى باستخدام الرمز `-pbkdf2` لتحسين أمان اشتقاق المفتاح.</span></span></span></div>
</li>
<li><div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="color: #9c5e00;" class="mycode_color">[b]فك تشفير رسالة باستخدام كلمة المرور</span></span></span></span>[/b]<span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"> : تقوم هذه الطريقة بفك تشفير الرسالة المشفرة في الخطوة السابقة باستخدام نفس كلمة المرور.</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Courier New', Courier, monospace, sans-serif;" class="mycode_font">&#36; echo "U2FsdGVkX1/POwwfJq2VK3mqDqFO1Ttfuc+q8UuvoQ4Z0F2byx1uNI3NSjeipkAi" | openssl enc -aes-256-cbc -a -d -salt -pbkdf2 -pass pass:mysecretpassword</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">استبدل "U2FsdGVkX1/POwwfJq2VK3mqDqFO1Ttfuc+q8UuvoQ4Z0F2byx1uNI3NSjeipkAi" بالرسالة المشفرة الفعلية. يشير الرمز `-d` إلى فك التشفير.</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-size: large;" class="mycode_size"><img src="https://linuxconfig.org/wp-content/uploads/2016/04/01-using-openssl-to-encrypt-messages-and-files-on-linux.avif" loading="lazy"  width="1128" height="193" alt="[صورة: 01-using-openssl-to-encrypt-messages-and...linux.avif]" class="mycode_img" /></span><span style="font-size: large;" class="mycode_size">تشفير وفك تشفير الرسالة باستخدام كلمة مرور</span></span></span></div>
</li>
<li><div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="color: #9c5e00;" class="mycode_color">[b]تشفير ملف باستخدام كلمة مرور</span></span></span></span>[/b]<span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"> : تقوم هذه الطريقة بتشفير محتويات الملف باستخدام كلمة مرور.</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Courier New', Courier, monospace, sans-serif;" class="mycode_font">&#36; openssl enc -aes-256-cbc -salt -pbkdf2 -in mydata.txt -out mydata.txt.enc -pass pass:mysecretpassword</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">يقوم هذا الأمر بقراءة الملف `mydata.txt`، ويقوم بتشفير محتوياته باستخدام AES-256-CBC، ثم يكتب البيانات المشفرة في `mydata.txt.enc`.</span></span></span></div>
<hr class="mycode_hr" />
<hr class="mycode_hr" />
</li>
<li><div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="color: #9c5e00;" class="mycode_color">[b]فك تشفير ملف باستخدام كلمة مرور</span></span></span></span>[/b]<span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"> : تقوم هذه الطريقة بفك تشفير الملف المشفر في الخطوة السابقة باستخدام نفس كلمة المرور.</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Courier New', Courier, monospace, sans-serif;" class="mycode_font">&#36; openssl enc -aes-256-cbc -d -salt -pbkdf2 -in mydata.txt.enc -out mydata.txt -pass pass:mysecretpassword</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">يقوم هذا الأمر بقراءة الملف المشفر `mydata.txt.enc`، وفك تشفير محتوياته، وكتابة البيانات الأصلية مرة أخرى في `mydata.txt`.</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-size: large;" class="mycode_size"><img src="https://linuxconfig.org/wp-content/uploads/2016/04/02-using-openssl-to-encrypt-messages-and-files-on-linux.avif" loading="lazy"  width="1124" height="324" alt="[صورة: 02-using-openssl-to-encrypt-messages-and...linux.avif]" class="mycode_img" /></span><span style="font-size: large;" class="mycode_size">تشفير وفك تشفير ملف باستخدام كلمة مرور</span></span></span></div>
</li>
<li><div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="color: #9c5e00;" class="mycode_color">[b]التشفير وفك التشفير باستخدام زوج مفاتيح عام/خاص</span></span></span></span>[/b]<span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"> : تتضمن هذه الطريقة تشفير رسالة بمفتاح عام وفك تشفيرها بمفتاح خاص مماثل.</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">إنشاء زوج مفاتيح:</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-family: 'Courier New', Courier, monospace, sans-serif;" class="mycode_font">&#36; openssl genpkey -algorithm RSA -out private_key.pem -aes256</span></span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-size: large;" class="mycode_size"><span style="font-family: 'Courier New', Courier, monospace, sans-serif;" class="mycode_font">&#36; openssl rsa -pubout -in private_key.pem -out public_key.pem</span></span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-size: large;" class="mycode_size"><img src="https://linuxconfig.org/wp-content/uploads/2016/04/03-using-openssl-to-encrypt-messages-and-files-on-linux.avif" loading="lazy"  width="1130" height="659" alt="[صورة: 03-using-openssl-to-encrypt-messages-and...linux.avif]" class="mycode_img" /></span><span style="font-size: large;" class="mycode_size">إنشاء زوج مفاتيح SSL</span></span></span></div>
<br />
<br />
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">تشفير الرسالة:</span></span></span></div>
<br />
<br />
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-family: 'Courier New', Courier, monospace, sans-serif;" class="mycode_font">&#36; echo "LinuxConfig.org" | openssl pkeyutl -encrypt -pubin -inkey public_key.pem -out encrypted_message.bin</span></span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font">فك تشفير الرسالة:</span></span></span></div>
<br />
<br />
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-family: 'Courier New', Courier, monospace, sans-serif;" class="mycode_font">&#36; openssl pkeyutl -decrypt -inkey private_key.pem -in encrypted_message.bin</span></span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-size: large;" class="mycode_size">في هذه ال</span><span style="font-size: large;" class="mycode_size">طريقة، يتم تشفير الرسالة بالمفتاح العام ولا يمكن فك تشفيرها إلا بالمفتاح الخاص المقابل، مما يضمن الاتصال الآمن.</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-size: large;" class="mycode_size"><img src="https://linuxconfig.org/wp-content/uploads/2016/04/04-using-openssl-to-encrypt-messages-and-files-on-linux.avif" loading="lazy"  width="1130" height="156" alt="[صورة: 04-using-openssl-to-encrypt-messages-and...linux.avif]" class="mycode_img" /></span><span style="font-size: large;" class="mycode_size">تشفير وفك تشفير الرسائل باستخدام أزواج مفاتيح OpenSSL.</span></span></span></div>
</li>
</ol>
<div style="text-align: justify;" class="mycode_align"><span style="font-size: large;" class="mycode_size"><span style="color: #444444;" class="mycode_color"><span style="font-family: Oswald, sans-serif;" class="mycode_font">خاتمة</span></span></span></div>
<div style="text-align: justify;" class="mycode_align"><span style="color: #444444;" class="mycode_color"><span style="font-family: 'Source Serif Pro', serif;" class="mycode_font"><span style="font-size: large;" class="mycode_size">يوفر OpenSSL أدوات </span><span style="font-size: medium;" class="mycode_size">فعّالة لتشفير وفك تشفير الرسائل والملفات على نظام Linux. بإتقان هذه الأساليب، يمكنك تعزيز أمان بياناتك بشكل ملحوظ. سواء كنت تفضل التشفير بكلمة مرور أو الأمان القوي لأزواج المفاتيح العامة/الخاصة، فإن OpenSSL لديه الإمكانيات اللازمة لتلبية احتياجاتك من التشفير.</span></span></span></div>]]></content:encoded>
		</item>
	</channel>
</rss>