<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Command line Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/command-line/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Sun, 09 Jan 2022 04:21:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How to use the Windows 10 terminal</title>
		<link>https://www.osradar.com/how-to-use-the-windows-10-terminal/</link>
					<comments>https://www.osradar.com/how-to-use-the-windows-10-terminal/#respond</comments>
		
		<dc:creator><![CDATA[roger]]></dc:creator>
		<pubDate>Sat, 22 Jan 2022 22:19:00 +0000</pubDate>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[command prompt]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[windows terminal]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=34326</guid>

					<description><![CDATA[<p>Hello! We have recently talked about what the terminal is. Well, it&#8217;s time to dig a little deeper. Today, we will learn how to use the terminal in Windows 10. A basic use allows you to navigate through the system directories, display their contents and access command help. Therefore, read on to learn how to [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-use-the-windows-10-terminal/">How to use the Windows 10 terminal</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Hello! We have recently talked about what the <a href="https://www.osradar.com/wp-admin/post.php?post=34298&amp;action=edit" target="_blank" rel="noreferrer noopener">terminal</a> is. Well, it&#8217;s time to dig a little deeper. Today, we will learn how to use the terminal in Windows 10. A basic use allows you to navigate through the system directories, display their contents and access command help. Therefore, read on to learn how to use the <a href="https://www.microsoft.com/en-us/software-download/windows10" target="_blank" rel="noreferrer noopener">Windows 10 </a>terminal.</p>



<h2>How to use Windows 10 terminal help.</h2>



<p>In particular, the help allows you to obtain the complete list of available commands. Don&#8217;t worry, there are actually not many. This is something we can do from the command prompt. Additionally, there is no distinction between a normal user and an administrator. Please note that the terminal is not case-sensitive, so it makes no difference whether we use lower case or upper case. With this in mind, we will use the following command:</p>



<pre class="wp-block-preformatted">HELP</pre>



<figure class="wp-block-image size-full"><img loading="lazy" width="979" height="512" src="https://www.osradar.com/wp-content/uploads/2022/01/ter-2.jpg" alt="List of commands available for the windows terminal" class="wp-image-34328" srcset="https://www.osradar.com/wp-content/uploads/2022/01/ter-2.jpg 979w, https://www.osradar.com/wp-content/uploads/2022/01/ter-2-300x157.jpg 300w, https://www.osradar.com/wp-content/uploads/2022/01/ter-2-768x402.jpg 768w, https://www.osradar.com/wp-content/uploads/2022/01/ter-2-696x364.jpg 696w" sizes="(max-width: 979px) 100vw, 979px" /><figcaption>List of commands available for the windows terminal</figcaption></figure>



<p>Consequently, we will be able to develop the help of each particular command. Specifically, <em>help</em> shows the function of the command as such. However, it does not display the complete help for a command. I mean, all the commands we saw in the previous list have their help section. This applies even to the command prompt itself. In effect, the help opens another instance of the terminal. l. To use the help in a command, type the command followed by <em>/?</em> Using this syntax:</p>



<pre class="wp-block-preformatted">BREAK /?</pre>



<pre class="wp-block-preformatted">CD /?</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="611" src="https://www.osradar.com/wp-content/uploads/2022/01/ter2-1-1024x611.jpg" alt="" class="wp-image-34330" srcset="https://www.osradar.com/wp-content/uploads/2022/01/ter2-1-1024x611.jpg 1024w, https://www.osradar.com/wp-content/uploads/2022/01/ter2-1-300x179.jpg 300w, https://www.osradar.com/wp-content/uploads/2022/01/ter2-1-768x458.jpg 768w, https://www.osradar.com/wp-content/uploads/2022/01/ter2-1-696x416.jpg 696w, https://www.osradar.com/wp-content/uploads/2022/01/ter2-1.jpg 1062w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Displaying CD command help</figcaption></figure>



<p>The information may be more extensive than what is shown in the window. Consequently, it is offered to press some keys to move to the next information screen. Another way to do this is to use the command:</p>



<pre class="wp-block-preformatted">HELP DIR</pre>



<figure class="wp-block-image size-full"><img loading="lazy" width="647" height="634" src="https://www.osradar.com/wp-content/uploads/2022/01/TER3-1.jpg" alt="" class="wp-image-34331" srcset="https://www.osradar.com/wp-content/uploads/2022/01/TER3-1.jpg 647w, https://www.osradar.com/wp-content/uploads/2022/01/TER3-1-300x294.jpg 300w" sizes="(max-width: 647px) 100vw, 647px" /></figure>



<h2>How to clean the terminal screen.</h2>



<p>After executing and executing commands, the screen will logically fill up with characters. Consequently, it is likely that at some point we will want to clean them up. With this in mind, we will use the following command:</p>



<pre class="wp-block-preformatted">CLS</pre>



<h2>How to force the termination of a command.</h2>



<p>Occasionally, we run a command, and it is taking a long time to finish. Or we simply run it accidentally. Consequently, if you want to finish it in a forced way, then you must press the combination Ctrl + C, and it will finish:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="611" src="https://www.osradar.com/wp-content/uploads/2022/01/ter4-1-1024x611.jpg" alt="Forcing the termination of a command in the Windows terminal" class="wp-image-34332" srcset="https://www.osradar.com/wp-content/uploads/2022/01/ter4-1-1024x611.jpg 1024w, https://www.osradar.com/wp-content/uploads/2022/01/ter4-1-300x179.jpg 300w, https://www.osradar.com/wp-content/uploads/2022/01/ter4-1-768x458.jpg 768w, https://www.osradar.com/wp-content/uploads/2022/01/ter4-1-696x416.jpg 696w, https://www.osradar.com/wp-content/uploads/2022/01/ter4-1.jpg 1062w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Forcing the termination of a command in the Windows terminal</figcaption></figure>



<h2>How to view the command history and use them again.</h2>



<p>The Windows terminal has a buffer where it stores the last executed commands, whether correct or erroneous. This serves to speed up the tasks we do. Consequently, we will be able to reuse them if we press the Up or Down arrow keys on the Prompt. Additionally, we can write the last command by pressing the Right directional key. We can also display the complete list of commands. To accomplish this, just press F7.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="611" src="https://www.osradar.com/wp-content/uploads/2022/01/ter5-1-1024x611.jpg" alt="Viewing the list of all commands used in Windows Terminal" class="wp-image-34333" srcset="https://www.osradar.com/wp-content/uploads/2022/01/ter5-1-1024x611.jpg 1024w, https://www.osradar.com/wp-content/uploads/2022/01/ter5-1-300x179.jpg 300w, https://www.osradar.com/wp-content/uploads/2022/01/ter5-1-768x458.jpg 768w, https://www.osradar.com/wp-content/uploads/2022/01/ter5-1-696x416.jpg 696w, https://www.osradar.com/wp-content/uploads/2022/01/ter5-1.jpg 1062w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Viewing the list of all commands used in Windows Terminal</figcaption></figure>



<h2>Using directory navigation.</h2>



<p>One of the most used functions of the CMD is to be able to navigate through the file directories. To display the directory where you are currently located, please use the following command:</p>



<pre class="wp-block-preformatted">DIR</pre>



<p>Note that you can expand the information by using the help command shown above.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="611" src="https://www.osradar.com/wp-content/uploads/2022/01/ter6-1-1024x611.jpg" alt="DIR command, displaying the user's current directory" class="wp-image-34335" srcset="https://www.osradar.com/wp-content/uploads/2022/01/ter6-1-1024x611.jpg 1024w, https://www.osradar.com/wp-content/uploads/2022/01/ter6-1-300x179.jpg 300w, https://www.osradar.com/wp-content/uploads/2022/01/ter6-1-768x458.jpg 768w, https://www.osradar.com/wp-content/uploads/2022/01/ter6-1-696x416.jpg 696w, https://www.osradar.com/wp-content/uploads/2022/01/ter6-1.jpg 1062w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>DIR command, displaying the user&#8217;s current directory</figcaption></figure>



<p>On the other hand, we can show the content of any directory even if we are not inside it. To achieve this, just type DIR and then the full or relative path:</p>



<pre class="wp-block-preformatted">DIR &lt;directory path></pre>



<figure class="wp-block-image size-full"><img loading="lazy" width="979" height="512" src="https://www.osradar.com/wp-content/uploads/2022/01/ter7-1.jpg" alt="" class="wp-image-34337" srcset="https://www.osradar.com/wp-content/uploads/2022/01/ter7-1.jpg 979w, https://www.osradar.com/wp-content/uploads/2022/01/ter7-1-300x157.jpg 300w, https://www.osradar.com/wp-content/uploads/2022/01/ter7-1-768x402.jpg 768w, https://www.osradar.com/wp-content/uploads/2022/01/ter7-1-696x364.jpg 696w" sizes="(max-width: 979px) 100vw, 979px" /></figure>



<p>Directories in the operating system have a tree-like composition. Consequently, we will go up as we go deeper into folders and subfolders. On the contrary, we will go down if we go out of them.</p>



<pre class="wp-block-preformatted">CD &lt;directory path></pre>



<pre class="wp-block-preformatted">CD..</pre>



<figure class="wp-block-image size-full"><img loading="lazy" width="979" height="512" src="https://www.osradar.com/wp-content/uploads/2022/01/ter8-1.png" alt="Navigating directories from the Windows terminal. " class="wp-image-34338" srcset="https://www.osradar.com/wp-content/uploads/2022/01/ter8-1.png 979w, https://www.osradar.com/wp-content/uploads/2022/01/ter8-1-300x157.png 300w, https://www.osradar.com/wp-content/uploads/2022/01/ter8-1-768x402.png 768w, https://www.osradar.com/wp-content/uploads/2022/01/ter8-1-696x364.png 696w" sizes="(max-width: 979px) 100vw, 979px" /><figcaption>Navigating directories from the Windows terminal.</figcaption></figure>



<h2>How to create directories with the Windows terminal.</h2>



<p>Next we will see another command related to directory navigation. Specifically, we will see how to create folders, with or without additional properties. The command will be as follows:</p>



<pre class="wp-block-preformatted">MKDIR &lt;path where the new directory will be created></pre>



<figure class="wp-block-image size-full"><img loading="lazy" width="979" height="512" src="https://www.osradar.com/wp-content/uploads/2022/01/ter9-1.png" alt="Creating a new folder in the command prompt" class="wp-image-34339" srcset="https://www.osradar.com/wp-content/uploads/2022/01/ter9-1.png 979w, https://www.osradar.com/wp-content/uploads/2022/01/ter9-1-300x157.png 300w, https://www.osradar.com/wp-content/uploads/2022/01/ter9-1-768x402.png 768w, https://www.osradar.com/wp-content/uploads/2022/01/ter9-1-696x364.png 696w" sizes="(max-width: 979px) 100vw, 979px" /><figcaption>Creating a new folder in the command prompt</figcaption></figure>



<h2>Let&#8217;s learn to erase as well</h2>



<p>We have seen how to create directories and files. Well, we can also delete them via commands. Specifically, we will use the DEL command to delete files and the RD command to delete directories.</p>



<pre class="wp-block-preformatted">DEL &lt;file path></pre>



<pre class="wp-block-preformatted">RD &lt;directory path></pre>



<h2>It is also possible to copy and paste.</h2>



<p>This Windows classic could not be missed. Yes, the Windows terminal also allows copy and paste. Let&#8217;s see the syntax:</p>



<pre class="wp-block-preformatted">XCOPY &lt;path of file or directory to copy> &lt;path of the location where to paste></pre>



<p>You only have to select the origin and after a space to add the destination. In addition, there are arguments to recursively copy the entire contents of a directory, to overwrite the contents already existing in the destination and others. It even works with shared drives over the network, as if we do it graphically.</p>



<h2>Complete files and view files on the go.</h2>



<p>This option is intended to speed up navigation. All commands that take paths or filenames as arguments allow auto-completion of the filename. For this purpose, just start typing the name of the folder or file. Then press TAB and the name will be completed. Note that the path is enclosed in quotes to allow for spaces, accents and other characters.</p>



<figure class="wp-block-image size-full is-style-default"><img loading="lazy" width="979" height="512" src="https://www.osradar.com/wp-content/uploads/2022/01/ter10-3.jpg" alt="Autocompleting a command in the Windows Terminal" class="wp-image-34341" srcset="https://www.osradar.com/wp-content/uploads/2022/01/ter10-3.jpg 979w, https://www.osradar.com/wp-content/uploads/2022/01/ter10-3-300x157.jpg 300w, https://www.osradar.com/wp-content/uploads/2022/01/ter10-3-768x402.jpg 768w, https://www.osradar.com/wp-content/uploads/2022/01/ter10-3-696x364.jpg 696w" sizes="(max-width: 979px) 100vw, 979px" /><figcaption>Autocompleting a command in the Windows Terminal</figcaption></figure>



<h2>Running simultaneous or conditional commands in Windows terminal</h2>



<p>In some cases, the Windows terminal behaves like the GNU/Linux terminal. Indeed, it can execute multiple commands succeeding or under certain conditions. This option becomes relevant for scripts that are executed line by line and small programs created by the user. Check the characters to be added:</p>



<pre class="wp-block-preformatted">[…] &amp; […] </pre>



<p>Let&#8217;s see how they are used. With the symbol <em>&amp;</em> we will be indicating to the terminal to run the second command when it finishes running the first one. Independently of the result of the first command. To clarify, it is an AND function.  For example:</p>



<pre class="wp-block-preformatted">ipconfig /release &amp; ipconfig /renew</pre>



<p>In this case, the status of the network connections will be checked first. Then the IP address and the configuration of all of them will be renewed.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="787" src="https://www.osradar.com/wp-content/uploads/2022/01/ter11-1024x787.png" alt="" class="wp-image-34342" srcset="https://www.osradar.com/wp-content/uploads/2022/01/ter11-1024x787.png 1024w, https://www.osradar.com/wp-content/uploads/2022/01/ter11-300x231.png 300w, https://www.osradar.com/wp-content/uploads/2022/01/ter11-768x590.png 768w, https://www.osradar.com/wp-content/uploads/2022/01/ter11-696x535.png 696w, https://www.osradar.com/wp-content/uploads/2022/01/ter11-1068x821.png 1068w, https://www.osradar.com/wp-content/uploads/2022/01/ter11.png 1280w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Let&#8217;s look at another use:</p>



<pre class="wp-block-preformatted">[…] &amp;&amp; […]</pre>



<p>We are talking about a classic<em> if</em> conditional. In effect, the second command will only be executed if the first one has shown a successful result or has concluded correctly. If the first command fails, the second command will not be executed either. Let&#8217;s see:</p>



<pre class="wp-block-preformatted">cd Documents\folder &amp;&amp; mkdir Documents\folder\docs</pre>



<figure class="wp-block-image size-full"><img loading="lazy" width="979" height="512" src="https://www.osradar.com/wp-content/uploads/2022/01/ter12-1.jpg" alt="" class="wp-image-34343" srcset="https://www.osradar.com/wp-content/uploads/2022/01/ter12-1.jpg 979w, https://www.osradar.com/wp-content/uploads/2022/01/ter12-1-300x157.jpg 300w, https://www.osradar.com/wp-content/uploads/2022/01/ter12-1-768x402.jpg 768w, https://www.osradar.com/wp-content/uploads/2022/01/ter12-1-696x364.jpg 696w" sizes="(max-width: 979px) 100vw, 979px" /></figure>



<p>We will only create the <em>docs</em> directory if we have been able to access<em> Documents </em>first. Let&#8217;s look at another use:</p>



<pre class="wp-block-preformatted">[…] || […]</pre>



<p>In this case, the second command will only be executed if the first one has not been executed successfully. In fact, it is just the opposite of the previous command. Specifically, it is an if-but-no command:</p>



<pre class="wp-block-preformatted">cd Documents\folder || mkdir Documents\folder</pre>



<p>For this condition, we will only create the folder directory if we have not been able to access it because it did not previously exist. These are certainly simple examples, but they can be very useful when executing more complex tasks. </p>



<h2>Conclusion</h2>



<p>Very well, in last instance we have seen how to use the terminal of Windows 10. I hope to have clarified your doubts, if you want some topic in particular, let us know in the comments. Bye!</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-use-the-windows-10-terminal/">How to use the Windows 10 terminal</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-use-the-windows-10-terminal/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to shutdown and reboot Windows Server 2022 with commands.</title>
		<link>https://www.osradar.com/how-to-shutdown-and-reboot-windows-server-2022-with-commands/</link>
					<comments>https://www.osradar.com/how-to-shutdown-and-reboot-windows-server-2022-with-commands/#respond</comments>
		
		<dc:creator><![CDATA[roger]]></dc:creator>
		<pubDate>Sat, 27 Feb 2021 22:57:00 +0000</pubDate>
				<category><![CDATA[Servers]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[command prompt]]></category>
		<category><![CDATA[windows server 2022]]></category>
		<category><![CDATA[windows server shutdown]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=28712</guid>

					<description><![CDATA[<p>We continue to explore the features of Windows Server 2022. It is well known that this is Microsoft&#8217;s next solution for enterprise environments. Well, like its predecessors, this version has variants with and without a graphical environment. In addition, it is well known that a common task is to shut down or restart the server. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-shutdown-and-reboot-windows-server-2022-with-commands/">How to shutdown and reboot Windows Server 2022 with commands.</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>We continue to explore the features of <a href="https://www.osradar.com/how-to-install-windows-server-2022-on-vmware/" target="_blank" rel="noreferrer noopener">Windows Server 2022</a>. It is well known that this is Microsoft&#8217;s next solution for enterprise environments. Well, like its predecessors, this version has variants with and without a graphical environment. In addition, it is well known that a common task is to shut down or restart the server. Therefore, this can be done from the start menu. However, in environments without a graphical plug-in, then we can do it from the command line. Read on to find out How to shutdown and reboot <a href="https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewserver" target="_blank" rel="noreferrer noopener">Windows Server 2022 </a>with commands.</p>



<h2>How to restart Windows Server 2022</h2>



<p>The first thing you have to do is to open a CMD as administrator. Then use the following syntax:</p>



<pre class="wp-block-preformatted">shutdown /r /t <em>time</em></pre>



<p>Please replace <em>Time </em>with the time you want to wait for the server to restart.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="979" height="511" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2021/02/re.png" alt="Scheduling Windows Server 2022 reboot" class="wp-image-28713" srcset="https://www.osradar.com/wp-content/uploads/2021/02/re.png 979w, https://www.osradar.com/wp-content/uploads/2021/02/re-300x157.png 300w, https://www.osradar.com/wp-content/uploads/2021/02/re-768x401.png 768w, https://www.osradar.com/wp-content/uploads/2021/02/re-696x363.png 696w" sizes="(max-width: 979px) 100vw, 979px" /><figcaption>Scheduling Windows Server 2022 reboot</figcaption></figure>



<p>This means that after 200 seconds, the server will be restarted. On the other hand, it is possible to add a message at restart time. For this purpose, just add the <strong>-c</strong> parameter:</p>



<pre class="wp-block-preformatted">shutdown /r /t time -c  <em>message</em></pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="979" height="510" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2021/02/re2.png" alt="" class="wp-image-28714" srcset="https://www.osradar.com/wp-content/uploads/2021/02/re2.png 979w, https://www.osradar.com/wp-content/uploads/2021/02/re2-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2021/02/re2-768x400.png 768w, https://www.osradar.com/wp-content/uploads/2021/02/re2-696x363.png 696w" sizes="(max-width: 979px) 100vw, 979px" /></figure>



<p>The server will restart after the timeout period has elapsed. On the other hand, sometimes there are open programs that prevent a restart. In such a case it is possible to force a shutdown using the following command:</p>



<pre class="wp-block-preformatted">shutdown /r /f</pre>



<p>It is even possible to schedule this task for a remote computer. With this in mind, use the following syntax:</p>



<pre class="wp-block-preformatted">shutdown /r /f /m \\Computer</pre>



<h2>How to shutdown Windows Server 2022 with commands</h2>



<p>The commands for shutting down the server are very similar to that for restarting it. In fact, only the first element changes. So use the following syntax:</p>



<pre class="wp-block-preformatted">shutdown /s /t time</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="978" height="513" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2021/02/re3.png" alt="Scheduling server shutdown after 400 seconds" class="wp-image-28715" srcset="https://www.osradar.com/wp-content/uploads/2021/02/re3.png 978w, https://www.osradar.com/wp-content/uploads/2021/02/re3-300x157.png 300w, https://www.osradar.com/wp-content/uploads/2021/02/re3-768x403.png 768w, https://www.osradar.com/wp-content/uploads/2021/02/re3-696x365.png 696w" sizes="(max-width: 978px) 100vw, 978px" /><figcaption>Scheduling server shutdown after 400 seconds</figcaption></figure>



<p>To add a message we use the -c parameter as follows:</p>



<pre class="wp-block-preformatted">shutdown /s /t time -c message</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="972" height="505" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2021/02/re4-2.png" alt="" class="wp-image-28718" srcset="https://www.osradar.com/wp-content/uploads/2021/02/re4-2.png 972w, https://www.osradar.com/wp-content/uploads/2021/02/re4-2-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2021/02/re4-2-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2021/02/re4-2-696x362.png 696w" sizes="(max-width: 972px) 100vw, 972px" /></figure>



<p>To force applications to close we run:</p>



<pre class="wp-block-preformatted">shutdown /s /f</pre>



<p>It is also possible to use it with remote computers:</p>



<pre class="wp-block-preformatted">shutdown /s /f /m \\COMPUTER</pre>



<p>Ultimately, we have seen how to shutdown and reboot Windows Server 2022 with commands. Consequently, we have an expeditious way to manage these tasks on the server. Bye!</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-shutdown-and-reboot-windows-server-2022-with-commands/">How to shutdown and reboot Windows Server 2022 with commands.</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-shutdown-and-reboot-windows-server-2022-with-commands/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to delete files and folders from CMD in Windows 10</title>
		<link>https://www.osradar.com/how-to-delete-files-and-folders-from-cmd-in-windows-10/</link>
					<comments>https://www.osradar.com/how-to-delete-files-and-folders-from-cmd-in-windows-10/#respond</comments>
		
		<dc:creator><![CDATA[Mel]]></dc:creator>
		<pubDate>Sat, 07 Mar 2020 00:47:51 +0000</pubDate>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[command prompt]]></category>
		<category><![CDATA[delete files]]></category>
		<category><![CDATA[delete folder]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows 10]]></category>
		<guid isPermaLink="false">https://windowsmen.com/?p=855</guid>

					<description><![CDATA[<p>Hi, how are you? Windows was born with the purpose of providing users with a graphical interface when using the computer. In fact, in the old DOS or MS-DOS systems everything was controlled by commands. However, Windows came with an intuitive graphical interface that took advantage of the use of a new peripheral known as [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-delete-files-and-folders-from-cmd-in-windows-10/">How to delete files and folders from CMD in Windows 10</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Hi, how are you? Windows was born with the purpose of providing users with a graphical interface when using the computer. In fact, in the old DOS or MS-DOS systems everything was controlled by commands. However, Windows came with an intuitive graphical interface that took advantage of the use of a new peripheral known as the mouse. Currently, all users use Windows with a mouse and navigate through files and folders using the file explorer. On the other hand, it is still possible to do it classically with the CMD. Consequently, we will see how to delete files and folders from CMD in <a href="https://www.microsoft.com/en-us/software-download/windows10" target="_blank" rel="noreferrer noopener" aria-label="Windows 10 (opens in a new tab)">Windows 10</a>.</p>



<h2>Use CMD to delete folders and files</h2>



<p>The idea of a terminal is traditionally associated with Linux operating systems. However, Windows also has its own terminal inherited from MS-DOS. This is known as Command Prompt. You will probably have used the <strong>PING</strong> command to check internet connectivity or <strong>cd</strong> to go to the hard drive directories. However, we will see how to delete folders and files using the CMD. Although it is more comfortable to use the graphical interface, it is always convenient to have this method. Because, sometimes the search button is broken. With this in mind we will use the DEL command. Next, please use the CD command to enter the directory. The syntax is as follows:</p>



<pre class="wp-block-preformatted"> DEL /F /A file.extension</pre>



<p>Please remember to replace the file name with its respective extension. To enter the cmd, just press the Win+Q combination and type CMD.</p>



<figure class="wp-block-image size-large"><img src="https://windowsmen.com/wp-content/uploads/2020/03/del.jpg" alt="Run a CMD" class="wp-image-862"/><figcaption>Run a CMD</figcaption></figure>



<figure class="wp-block-image size-large"><img src="https://windowsmen.com/wp-content/uploads/2020/03/del2.jpg" alt="Delete a file with the DEL command" class="wp-image-865"/><figcaption>Delete a file with the DEL command</figcaption></figure>



<p>The /F switch allows you to force the file to be deleted. While the /A allows to delete only the files marked as <em>ready for archiving</em> by Windows.</p>



<h2>How to delete folders with CMD</h2>



<p>To delete folders, the process is similar to that of deleting files. However, the change is to use the RD command. Similarly, use the CD command to enter the directory where the folder to be deleted is located. To delete folders, the process is similar to that of deleting files. However, the change is to use the RD command. Similarly, use the CD command to enter the directory where the folder to be deleted is located. The syntax is as follows:</p>



<pre class="wp-block-preformatted"> RD /S folder</pre>



<p>Please remember to replace folder with the name of the folder to be deleted.</p>



<figure class="wp-block-image size-large"><img src="https://windowsmen.com/wp-content/uploads/2020/03/del3.jpg" alt="Delete a folder using the RD command." class="wp-image-867"/><figcaption>Delete a folder using the RD command.</figcaption></figure>



<p>The /S parameter indicates that we will also delete all subfolders within the folder.  If it is not used and there is a folder inside, it will not delete the main folder.</p>



<h2>What to do if there is an error message that prevents you from deleting the folder</h2>



<p>It is likely that when you use the DEl or RD command, the system will throw an error message that prevents you from doing the task. This usually happens because of a permission problem. Specifically, when you try to delete a folder you don&#8217;t own. Or when trying to delete a system folder. In those cases, CMD will not allow you to delete the folder or file. To solve this problem, just open CMD with administrator privileges:</p>



<figure class="wp-block-image size-large"><img src="https://windowsmen.com/wp-content/uploads/2020/03/del-1.jpg" alt="Runs a CMD with administrator privileges " class="wp-image-868"/><figcaption>Runs a CMD with administrator privileges </figcaption></figure>



<p>In this way, it is possible to delete any type of folder or file. The exception is if you try to delete a protected system file.</p>



<h2>Conclusion</h2>



<p>In the final analysis, we saw how to delete files and folders from the CMD in Windows 10. If you like to manage your computer with the terminal, then this is your option. Before saying goodbye, I invite you to our post about an <a href="https://windowsmen.com/switch-is-a-free-alternative-dock-for-windows-10/" target="_blank" rel="noreferrer noopener" aria-label="alternative dock (opens in a new tab)">alternative dock</a> for Windows 10. Bye!</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-delete-files-and-folders-from-cmd-in-windows-10/">How to delete files and folders from CMD in Windows 10</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-delete-files-and-folders-from-cmd-in-windows-10/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install apps in Windows 10 with the command line</title>
		<link>https://www.osradar.com/how-to-install-apps-in-windows-10-with-the-command-line/</link>
					<comments>https://www.osradar.com/how-to-install-apps-in-windows-10-with-the-command-line/#respond</comments>
		
		<dc:creator><![CDATA[Mel]]></dc:creator>
		<pubDate>Tue, 03 Mar 2020 00:50:21 +0000</pubDate>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[chocolatey]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[cmd windows 10]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[command prompt]]></category>
		<category><![CDATA[package manager windows]]></category>
		<category><![CDATA[powershell]]></category>
		<guid isPermaLink="false">https://windowsmen.com/?p=754</guid>

					<description><![CDATA[<p>Hi, how are you? For all traditional Windows users, installing apps has no secrets. In fact, you just have to download the installer, run it and follow the instructions. And by going to the app stores, this process is even easier. Just download it if it&#8217;s free or buy it if it&#8217;s paid and the [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-apps-in-windows-10-with-the-command-line/">How to install apps in Windows 10 with the command line</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Hi, how are you? For all traditional Windows users, installing apps has no secrets. In fact, you just have to download the installer, run it and follow the instructions. And by going to the app stores, this process is even easier. Just download it if it&#8217;s free or buy it if it&#8217;s paid and the process will be done automatically. However, it is not the same to install a single application than to install several of them. Especially when you buy a new PC or format an old one. Similarly, when working with maintenance of several computers. Anyway, tools like <a rel="noreferrer noopener" aria-label="Chocolatey  (opens in a new tab)" href="https://chocolatey.org" target="_blank">Chocolatey </a>are very helpful. So in this post we&#8217;ll see how to install apps in Windows 10 from the command line.</p>



<h2>Chocolatey. A package manager for Windows.</h2>



<p>This is a concept traditionally associated with Linux operating systems and away from the Windows ecosystem. In simple terms, it consists in that when installing a program, not only the main package is downloaded, but also the packages on which the program depends. It seems like a complex process, but in reality what it does is simplify the process. Well, Chocolatey what it does is bring this philosophy to Windows. Consequently, it is possible to install apps with a command line command. On the other hand, by installing apps in the traditional way, you run the risk of downloading PUPs or even malware. </p>



<p>Chocolatey makes sure to download the programs from their verified and reliable source. Specifically, there are more than 7,500 packages available to be installed. In the list, there are such well-known options as Google Chrome, Skype, Adobe Acrobat Reader. But there are also free and open source software available, such as 7-Zip, VLC or Mozilla Firefox. First, let&#8217;s install the package manager. This requires running a PowerShell with administrative privileges. With this intention, press the Win+X combination and execute the console:</p>



<figure class="wp-block-image size-large"><img src="https://windowsmen.com/wp-content/uploads/2020/03/choco.jpg" alt="Run a PowerShell with administrative privileges" class="wp-image-756"/><figcaption>Run a PowerShell with administrative privileges</figcaption></figure>



<p>Once the console is open, please execute the following command:</p>



<pre class="wp-block-preformatted">Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))</pre>



<figure class="wp-block-image size-large"><img src="https://windowsmen.com/wp-content/uploads/2020/03/choco2-1024x548.jpg" alt="Chocolatey installation successful." class="wp-image-758"/><figcaption>Chocolatey installation successful.</figcaption></figure>



<p> It can be seen that the installation route is in&nbsp;<strong>C:\ProgramData\chocolatey</strong>&nbsp;In the same way, the subdirectory lib is used for the packages. </p>



<h2>Install and uninstall apps with Chocolatey.</h2>



<p>Once downloaded and installed, you are ready for the first steps with Chocolatey. First, to access help, please run this command from the PowerShell:</p>



<pre class="wp-block-preformatted"> choco /?  </pre>



<figure class="wp-block-image size-large"><img src="https://windowsmen.com/wp-content/uploads/2020/03/choco3-1024x548.jpg" alt="Chocolatey Help" class="wp-image-761"/><figcaption>Chocolatey Help</figcaption></figure>



<p>To see if a package is available, use the <em>search</em> command::</p>



<pre class="wp-block-preformatted">search</pre>



<figure class="wp-block-image size-large"><img src="https://windowsmen.com/wp-content/uploads/2020/03/choco4.jpg" alt="Winrar package available" class="wp-image-762"/><figcaption>Winrar package available</figcaption></figure>



<p>To install it, just run this command:</p>



<pre class="wp-block-preformatted">choco install winrar</pre>



<p>Please note that you always have to confirm the installation.</p>



<figure class="wp-block-image size-large"><img src="https://windowsmen.com/wp-content/uploads/2020/03/choco5.jpg" alt="Installing Winrar with Chocolatey" class="wp-image-764"/><figcaption>Installing Winrar with Chocolatey</figcaption></figure>



<p>To uninstall the program just use the command:</p>



<pre class="wp-block-preformatted">uninstall</pre>



<figure class="wp-block-image size-large"><img src="https://windowsmen.com/wp-content/uploads/2020/03/choco6-1-1024x548.jpg" alt="Uninstall the app" class="wp-image-767"/><figcaption>Uninstall the app</figcaption></figure>



<h2>Other useful commands from Chocolatey.</h2>



<p>Once you have several programs installed using Chocolatey, it is possible to update them all using the update command:</p>



<pre class="wp-block-preformatted">choco update</pre>



<p>To install several programs at once, use the install command followed by the names of all the packages. Example:</p>



<pre class="wp-block-preformatted">choco Install firefox 7zip vlc skype </pre>



<p>In this example four popular apps will be installed. These are the Firefox browser, the 7zip file uncompressor, the VLC media player and the Skype video calling and messaging app. On the other hand, to install the Chocolatey graphic manager, run this command:</p>



<pre class="wp-block-preformatted"> choco install chocolateygui </pre>



<p>Besides, to see a list of all available packages, use this command:</p>



<pre class="wp-block-preformatted">choco list</pre>



<h2>Conclusion</h2>



<p>Ultimately, we&#8217;ve seen how to install apps on Windows 10 using the command line. Consequently, you have another interesting option to install programs quickly and safely. Likewise, you can see the programs available and their respective command from the <a rel="noreferrer noopener" aria-label="Chocolatey  (opens in a new tab)" href="https://chocolatey.org/packages" target="_blank">Chocolatey </a>website. All right, that&#8217;s it for now. Before saying goodbye I invite you to see our post about the next Windows 10 <a href="https://windowsmen.com/windows-10-update-kb4535996-is-not-available-to-everyone/" target="_blank" rel="noreferrer noopener" aria-label="update (opens in a new tab)">update</a>. See you soon!</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-apps-in-windows-10-with-the-command-line/">How to install apps in Windows 10 with the command line</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-apps-in-windows-10-with-the-command-line/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to use ZCAT and CAT commands on GNU/LINUX</title>
		<link>https://www.osradar.com/how-to-use-zcat-and-cat-commands-on-gnu-linux/</link>
					<comments>https://www.osradar.com/how-to-use-zcat-and-cat-commands-on-gnu-linux/#comments</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Tue, 21 Aug 2018 09:41:03 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[unix]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=5346</guid>

					<description><![CDATA[<p>Many people find it difficult to use the terminal of a GNU/LINUX distribution, and this makes it difficult for them to learn how to work with it, which is one of the most powerful tools in the Unix environment. There are very simple commands to use and others not so simple, for now we will [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-use-zcat-and-cat-commands-on-gnu-linux/">How to use ZCAT and CAT commands on GNU/LINUX</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Many people find it difficult to use the terminal of a GNU/LINUX distribution, and this makes it difficult for them to learn how to work with it, which is one of the most powerful tools in the Unix environment.</p>
<p>There are very simple commands to use and others not so simple, for now we will focus on two very simple but useful commands when performing tasks in the terminal, especially if you are a system administrator, the ZCAT and CAT commands.</p>
<h2>First we go with zcat!!</h2>
<p>Actually both commands are simple and similar to use, first we will deal with zcat.</p>
<p><strong>zcat</strong> is a command for unix systems such as GNU/LINUX that allows us to view the contents of compressed files from the command line.</p>
<p>Its use from the terminal is simple and uses this syntax:</p>
<p><strong>zcat [OPTION]&#8230; [FILE]&#8230;</strong></p>
<p>Using the help of zcat in the terminal we visualize the available options:</p>
<table style="height: 262px;" width="591">
<tbody>
<tr>
<th colspan="2">ZCAT  options</th>
</tr>
</tbody>
<tbody>
<tr>
<td>Option</td>
<td>Use</td>
</tr>
<tr>
<td>-f &#8211;force</td>
<td>force</td>
</tr>
<tr>
<td>-l, &#8211;list</td>
<td>list compressed file contens</td>
</tr>
<tr>
<td>-q, &#8211;quiet</td>
<td>Suppress all warnings</td>
</tr>
<tr>
<td>-r, &#8211;recursive</td>
<td>recursive mode</td>
</tr>
<tr>
<td>-S, &#8211;suffix=SUF</td>
<td>use suffix SUF on compressed file (replace SUF)</td>
</tr>
<tr>
<td>-t, &#8211;test</td>
<td>test compressed file integrity</td>
</tr>
<tr>
<td>-v, &#8211;verbose</td>
<td>verbose mode</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Its use is simple. First we will create 4.txt files and then we will compress them for our example.</p>
<pre class="">:~$ mkdir zcat_command
:~$ cd zcat_command
:~$ touch r{1..3}.txt
:~$ nano r1.txt // we add some text
:~$ gzip r1.txt r2.txt r3.txt</pre>
<p><figure id="attachment_5364" aria-describedby="caption-attachment-5364" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5364" src="https://www.osradar.com/wp-content/uploads/2018/08/1-5.png" alt="1.- Creating files" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/1-5.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/1-5-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/1-5-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/1-5-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/1-5-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/1-5-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/1-5-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5364" class="wp-caption-text">1.- Creating files</figcaption></figure></p>
<p>the result of this is the creation of 3 compressed text files with extension.txt.gz</p>
<p><figure id="attachment_5365" aria-describedby="caption-attachment-5365" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5365" src="https://www.osradar.com/wp-content/uploads/2018/08/2-6.png" alt="2.- showing created files" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/2-6.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/2-6-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/2-6-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/2-6-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/2-6-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/2-6-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/2-6-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5365" class="wp-caption-text">2.- showing created files</figcaption></figure></p>
<p>Now we&#8217;re ready to go.</p>
<ul>
<li>
<h4>Display the contents of a compressed text file with gz</h4>
</li>
</ul>
<pre class="">:~$ zcat r1.txt.gz</pre>
<p><figure id="attachment_5366" aria-describedby="caption-attachment-5366" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5366" src="https://www.osradar.com/wp-content/uploads/2018/08/3-6.png" alt="3.- showing the content of a compressed tex file" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/3-6.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/3-6-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/3-6-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/3-6-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/3-6-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/3-6-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/3-6-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5366" class="wp-caption-text">3.- showing the content of a compressed tex file</figcaption></figure></p>
<ul>
<li>
<h4>Displaying the contents of multiple files at the same time</h4>
</li>
</ul>
<p>We can display the contents of several files at once:</p>
<pre class="">:~$ zcat file1 file2
:~$ zcat r1.txt.gz r2.txt.gz</pre>
<p>We will get the contents of each file successively:</p>
<p><figure id="attachment_5368" aria-describedby="caption-attachment-5368" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5368" src="https://www.osradar.com/wp-content/uploads/2018/08/4-5.png" alt="4.- Showing multiple contents files" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/4-5.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/4-5-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/4-5-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/4-5-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/4-5-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/4-5-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/4-5-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5368" class="wp-caption-text">4.- Showing multiple contents files</figcaption></figure></p>
<ul>
<li>
<h4>Enabling pagination</h4>
</li>
</ul>
<p>To enable pagination we can do it with less or more</p>
<pre class="">:~$ zcat file | more
:~$ zcat file | less
:~$ zcat r1.txt.gz | more
:~$ zcat r1.txt.gz | less</pre>
<p><figure id="attachment_5369" aria-describedby="caption-attachment-5369" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5369" src="https://www.osradar.com/wp-content/uploads/2018/08/5-6.png" alt="5.- enabling pagination" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/5-6.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/5-6-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/5-6-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/5-6-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/5-6-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/5-6-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/5-6-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5369" class="wp-caption-text">5.- enabling pagination</figcaption></figure></p>
<ul>
<li>
<h4>Force Mode</h4>
</li>
</ul>
<p>By default zcat only works with.gz compressed files but it can be used with uncompressed files by forcing them to run.</p>
<pre class="">:~$ zcat -f file
:~$ nano t1.txt // add hello
:~$ zcat -f t1.txt</pre>
<p><figure id="attachment_5370" aria-describedby="caption-attachment-5370" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5370" src="https://www.osradar.com/wp-content/uploads/2018/08/6-5.png" alt="6.- Force mode of zcat" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/6-5.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/6-5-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/6-5-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/6-5-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/6-5-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/6-5-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/6-5-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5370" class="wp-caption-text">6.- Force mode of zcat</figcaption></figure></p>
<ul>
<li>
<h4>Showing compressed file properties</h4>
</li>
</ul>
<p>It is also possible to show the properties of a file by using the option -l</p>
<pre class="">:~$ zcat -l file.gz
:~$ zcat -l r1.txt.gz</pre>
<p><figure id="attachment_5371" aria-describedby="caption-attachment-5371" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5371" src="https://www.osradar.com/wp-content/uploads/2018/08/7-6.png" alt="7.- Using -l option" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/7-6.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/7-6-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/7-6-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/7-6-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/7-6-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/7-6-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/7-6-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5371" class="wp-caption-text">7.- Using -l option</figcaption></figure></p>
<h2>Now it&#8217;s cat&#8217;s turn</h2>
<p>The cat command is very similar in its use and functionality to zcat, but this time we will work with uncompressed text files. But it also serves to concatenate the output of several files by the standard output of the terminal. We will also have a new feature, which is that cat allows us to concatenate text files to be displayed in a single output by the terminal.</p>
<p>First we&#8217;ll examine the help the command gives us from your terminal:</p>
<table style="height: 262px;" width="591">
<tbody>
<tr>
<th colspan="2">CAT options</th>
</tr>
</tbody>
<tbody>
<tr>
<td>Option</td>
<td>Use</td>
</tr>
<tr>
<td>-A, &#8211;show-all</td>
<td>Show all contens</td>
</tr>
<tr>
<td>-b, &#8211;number-nonblank</td>
<td>number nonempty output lines</td>
</tr>
<tr>
<td>-E, &#8211;show-ends</td>
<td>display $ at end of each line</td>
</tr>
<tr>
<td>-n, &#8211;number</td>
<td>number all output lines</td>
</tr>
<tr>
<td>-T, &#8211;show-tabs</td>
<td>display TAB characters as ^I</td>
</tr>
<tr>
<td>-t, &#8211;test</td>
<td>test compressed file integrity</td>
</tr>
<tr>
<td>&#8211;version</td>
<td>show cat&#8217;s version</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>We will examine several examples to demonstrate how to use this command:</p>
<ul>
<li>
<h4>Display the contents of a text file</h4>
</li>
</ul>
<p>This is the most basic way to use the cat command:</p>
<pre class="">:~$ cat path_of_the_file
:~$ cat file1</pre>
<p><figure id="attachment_5390" aria-describedby="caption-attachment-5390" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5390" src="https://www.osradar.com/wp-content/uploads/2018/08/8-4.png" alt="8.- Using cat command" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/8-4.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/8-4-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/8-4-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/8-4-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/8-4-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/8-4-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/8-4-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5390" class="wp-caption-text">8.- Using cat command</figcaption></figure></p>
<ul>
<li>
<h4>Display the contents of multiple files</h4>
</li>
</ul>
<p>It is also possible to display several files at once, for this purpose:</p>
<pre class="">:~$ cat path_of_the_file1 path_of_the_file2 ...
:~$ cat file1.txt file2.txt</pre>
<p><figure id="attachment_5391" aria-describedby="caption-attachment-5391" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5391" src="https://www.osradar.com/wp-content/uploads/2018/08/9-6.png" alt="9.- using cat command" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/9-6.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/9-6-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/9-6-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/9-6-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/9-6-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/9-6-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/9-6-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5391" class="wp-caption-text">9.- using cat command</figcaption></figure></p>
<ul>
<li>
<h4>Identify Specific File Content</h4>
</li>
</ul>
<p>If, as in the previous example, we need to show the contents of several files, it is very useful to identify when one line is finished and the other starts. Using the -e option we can do that, because at the end of the line&#8217;s content display it places the <strong>$ sign</strong></p>
<pre class="">:~$ cat -e file1.txt file2.txt</pre>
<p><figure id="attachment_5392" aria-describedby="caption-attachment-5392" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5392" src="https://www.osradar.com/wp-content/uploads/2018/08/10-4.png" alt="10.- using -e option" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/10-4.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/10-4-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/10-4-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/10-4-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/10-4-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/10-4-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/10-4-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5392" class="wp-caption-text">10.- using -e option</figcaption></figure></p>
<ul>
<li>
<h4>Add Number of Lines in Output</h4>
</li>
</ul>
<p>However, showing the lines that a file has is very easy and its use is highly recommended to better examine the file.</p>
<pre class="">:~$ cat -n file1.txt</pre>
<p><figure id="attachment_5393" aria-describedby="caption-attachment-5393" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5393" src="https://www.osradar.com/wp-content/uploads/2018/08/11-3.png" alt="11.- Adding the -n option" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/11-3.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/11-3-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/11-3-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/11-3-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/11-3-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/11-3-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/11-3-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5393" class="wp-caption-text">11.- Adding the -n option</figcaption></figure></p>
<ul>
<li>
<h4>Copy Contents of One file to Another</h4>
</li>
</ul>
<p>cat comes from &#8220;concatenate&#8221; so we can pass the content from one file to another.</p>
<pre class="">:~$ cat file1.txt &gt; file2.txt
:~$ cat file2.txt</pre>
<p><figure id="attachment_5394" aria-describedby="caption-attachment-5394" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5394" src="https://www.osradar.com/wp-content/uploads/2018/08/12-4.png" alt="12.- using cat command for copy contents" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/12-4.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/12-4-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/12-4-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/12-4-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/12-4-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/12-4-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/12-4-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5394" class="wp-caption-text">12.- using cat command for copy contents</figcaption></figure></p>
<p>With this &gt; cat operator, it reads the contents of the first file and overwrites the second file.</p>
<ul>
<li>
<h4>Combine or Append the Content of One File to Another</h4>
</li>
</ul>
<p>Now if we want to &#8220;combine&#8221; the contents of one file with another we must use the &gt;&gt; operator.</p>
<pre class="">:~$ cat file1.txt &gt;&gt; file2.txt
:~$ cat file2.txt</pre>
<p><figure id="attachment_5395" aria-describedby="caption-attachment-5395" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-5395" src="https://www.osradar.com/wp-content/uploads/2018/08/13-2.png" alt="13.- using &gt;&gt; operator" width="1368" height="710" srcset="https://www.osradar.com/wp-content/uploads/2018/08/13-2.png 1368w, https://www.osradar.com/wp-content/uploads/2018/08/13-2-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2018/08/13-2-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2018/08/13-2-1024x531.png 1024w, https://www.osradar.com/wp-content/uploads/2018/08/13-2-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2018/08/13-2-1068x554.png 1068w, https://www.osradar.com/wp-content/uploads/2018/08/13-2-809x420.png 809w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-5395" class="wp-caption-text">13.- using &gt;&gt; operator</figcaption></figure></p>
<p>As you can see cat reads the content of the first file and combines it with the second one.</p>
<p>As a result, we can say that these very similar commands in their use are of great help to get a taste for the terminal of any Unix system, or in this case, of GNU/LINUX. Both are simple to use, and their usefulness is very diverse according to what we need.</p>
<p>Try using these and other commands, please share this article through your social networks.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-use-zcat-and-cat-commands-on-gnu-linux/">How to use ZCAT and CAT commands on GNU/LINUX</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-use-zcat-and-cat-commands-on-gnu-linux/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to add/remove user accounts with the command line in Windows 10?</title>
		<link>https://www.osradar.com/how-to-add-remove-user-accounts-with-the-command-line-in-windows-10/</link>
					<comments>https://www.osradar.com/how-to-add-remove-user-accounts-with-the-command-line-in-windows-10/#respond</comments>
		
		<dc:creator><![CDATA[Mel K]]></dc:creator>
		<pubDate>Thu, 28 Dec 2017 16:03:28 +0000</pubDate>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[Add/Remove User Account]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[User Account]]></category>
		<category><![CDATA[Windows 10]]></category>
		<guid isPermaLink="false">http://osradar.com/?p=677</guid>

					<description><![CDATA[<p>The creation of individual user accounts enables each user to have customized settings, themes, document settings and more. The conventional way to do this is via “Control Panel”. However, account creation can also be done using the “Command Prompt”. In order to do so, you need to make sure that you have access to the [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-add-remove-user-accounts-with-the-command-line-in-windows-10/">How to add/remove user accounts with the command line in Windows 10?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><span style="font-weight: 400;">The creation of individual user accounts enables each user to have customized settings, themes, document settings and more. The conventional way to do this is via “Control Panel”. However, account creation can also be done using the “Command Prompt”. In order to do so, you need to make sure that you have access to the Admin account of the Personal Computer (PC). </span></p>
<p><b>Please note: This process will not work if you do not have the Admin account credentials. </b></p>
<p><span style="font-weight: 400;">Assuming that you do have the credentials, this is how you can add/remove user accounts in Windows 10 with a command line. </span></p>
<ul>
<li style="font-weight: 400;"><span style="font-weight: 400;">Right click on the “Start Menu” button and select “Command Prompt (Admin)” option from the menu or Press “Windows + X” buttons and then select “Command Prompt (Admin)” from the menu. </span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">If prompted for confirmation, click “Yes”. </span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">This will open the “Command Window”. </span></li>
</ul>
<p>&nbsp;</p>
<h1><span style="font-weight: 400;">New User Account Creation</span></h1>
<p><span style="font-weight: 400;">You can use this window to both add and/or remove user accounts. If you wish to add a user, use this command: </span></p>
<p><span style="font-weight: 400;">“net user UserName Password /add” </span></p>
<p><span style="font-weight: 400;">Where </span></p>
<p><span style="font-weight: 400;">UserName = The username of the new account you wish to create. </span></p>
<p><span style="font-weight: 400;">Password = The password for the new user account. </span></p>
<p><span style="font-weight: 400;">For instance, if I need to create a new account with the name “Joe” and the password “joehatescandy”, I’ll use the code: </span></p>
<pre><span style="font-weight: 400;">“net user Joe joehatescandy /add” </span></pre>
<p><span style="font-weight: 400;">After you press enter, the </span><b>Command Window</b><span style="font-weight: 400;"> will display the message: “The command completed successfully” signifying the successful creation of the desired user account. </span></p>
<p><b>Please note: In the above mentioned code the space between the Password and ‘/add’ is part of the syntax. If not used, the code will not execute correctly. </b></p>
<p>&nbsp;</p>
<p><b>Tip: </b><span style="font-weight: 400;">If you do not wish for the account password to be displayed, then you can use the following code: </span></p>
<pre><span style="font-weight: 400;">“net user UserName * /add” </span></pre>
<p><span style="font-weight: 400;">After you press “Enter”, the </span><b>Command Window</b><span style="font-weight: 400;"> will ask you to type in the password twice and it will not be displayed on the screen.</span></p>
<p><img loading="lazy" class="aligncenter wp-image-686 size-full" src="http://osradar.com/wp-content/uploads/2017/12/User-creation.png" alt="" width="600" height="300" srcset="https://www.osradar.com/wp-content/uploads/2017/12/User-creation.png 600w, https://www.osradar.com/wp-content/uploads/2017/12/User-creation-300x150.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<h1><span style="font-weight: 400;">Existing User Account Deletion</span></h1>
<p><span style="font-weight: 400;">The deletion process is similar to the above mentioned addition process. In order to delete an existing user account, you need to know the name of the user account (case-sensitive). Assuming that you know the name of the user account, this is the code you’ll need to use to delete it: </span></p>
<pre><span style="font-weight: 400;">“net user UserName /delete” </span></pre>
<p><span style="font-weight: 400;">Where</span></p>
<p><span style="font-weight: 400;">UserName = The name of the existing user account. </span></p>
<p><span style="font-weight: 400;">For instance, if I wish to delete the earlier created user account “Joe”, I’ll use the code: </span></p>
<pre><span style="font-weight: 400;">“net user Joe /delete” </span></pre>
<p><span style="font-weight: 400;">After typing the code press “Enter”. Once the process is completed the </span><b>Command Window</b><span style="font-weight: 400;"> will display the message: “The command completed successfully” signifying the successful deletion of the user account.</span></p>
<p><img loading="lazy" class="aligncenter wp-image-688 size-full" src="http://osradar.com/wp-content/uploads/2017/12/account-deletion.png" alt="" width="600" height="300" srcset="https://www.osradar.com/wp-content/uploads/2017/12/account-deletion.png 600w, https://www.osradar.com/wp-content/uploads/2017/12/account-deletion-300x150.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-add-remove-user-accounts-with-the-command-line-in-windows-10/">How to add/remove user accounts with the command line in Windows 10?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-add-remove-user-accounts-with-the-command-line-in-windows-10/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
