<?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>EmbLogic &#187; bash</title>
	<atom:link href="https://www.emblogic.com/blog/tag/bash/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Tue, 03 Mar 2020 13:00:06 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>ls &#8211; list command</title>
		<link>https://www.emblogic.com/blog/02/ls-list-command/</link>
		<comments>https://www.emblogic.com/blog/02/ls-list-command/#comments</comments>
		<pubDate>Wed, 10 Feb 2016 17:20:32 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[ll]]></category>
		<category><![CDATA[long list]]></category>
		<category><![CDATA[ls]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[shell scripting]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13262</guid>
		<description><![CDATA[ls &#8211; list command ================= - ls means list directory content - Prototype : ls [OPTION] &#8230; [FILE] &#8230; - Exit status It returns 0 ,on success Returns 1 in case of minor problems (eg. cannot access subdirectory) returns 2 &#8230; <a href="https://www.emblogic.com/blog/02/ls-list-command/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>ls &#8211; list command<br />
=================<br />
- ls means list directory content<br />
- Prototype :<br />
ls [OPTION] &#8230; [FILE] &#8230;<br />
- Exit status<br />
It returns 0 ,on success<br />
Returns 1 in case of minor problems (eg. cannot access subdirectory)<br />
returns 2 in case of serious trouble (eg. Cannot access command line argument)<br />
- For specific listing you can use *<br />
eg.1) For listing all files starting with a use :<br />
ls a*<br />
2) for listing all .c files use :<br />
ls *.c<br />
3) for listing all .c files starting with a use :<br />
ls a*.c<br />
- Some common options are :<br />
i) -a &#8211;all &#8211;&gt; Do not ignore enteries starting with .<br />
Use this to view swap or temporary files.<br />
ii) -l &#8211;&gt; long listing format<br />
iii) -r &#8211;) Reverse order sort (by name) and list<br />
iv) -s &#8211;size &#8211;&gt; Print allocated size of each file in blocks<br />
v) -S &#8211;&gt; Sort by file size<br />
vi) -t &#8211;&gt; Sort by modification time, newest first<br />
vii) -U &#8211;&gt; Do not sort; list enteries in directory order<br />
viii) -X &#8211;&gt; Sort alphabetically by entry extension.<br />
ix) -F &#8211;&gt; to distinguish files from directories (Puts / in directory and * with executable files)<br />
x) -R &#8211;&gt; It shows files that are contained in directory. It continued to dirrectory in a directory and so on.</p>
<p>- In fedora for long lsting use command :</p>
<p>ll</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/ls-list-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CD &#8211; Change Directory Command</title>
		<link>https://www.emblogic.com/blog/02/cd-change-directory-command/</link>
		<comments>https://www.emblogic.com/blog/02/cd-change-directory-command/#comments</comments>
		<pubDate>Wed, 10 Feb 2016 17:18:28 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[cd]]></category>
		<category><![CDATA[change directory]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[fedora linux]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13260</guid>
		<description><![CDATA[CD &#8211; Change Directory Command ============================= - cd means change working directory - Prototype: cd [-L &#124; -P] [directory] cd - -If you do not give any directory to cd command, it will take you to home directory. eg. cd &#8230; <a href="https://www.emblogic.com/blog/02/cd-change-directory-command/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>CD &#8211; Change Directory Command<br />
=============================<br />
- cd means change working directory<br />
- Prototype:<br />
cd [-L | -P] [directory]<br />
cd -<br />
-If you do not give any directory to cd command, it will take you to home directory.<br />
eg. cd &#8211;&gt; It will go to home directory.<br />
- For previous directory use :<br />
cd ..<br />
- Further for more than one previous directory use :<br />
cd ../..<br />
- Directory can be defined by 2 types :<br />
i) Absolute filepath &#8211; Path starting from &#8216;/&#8217;.<br />
eg. cd /usr/bin/<br />
ii)Relative Filepath &#8211; Path relative to current directory<br />
eg. cd /usr &#8211;&gt; Absolute filepath<br />
cd etc &#8211;&gt; Relative Filepath</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/cd-change-directory-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Filesystem</title>
		<link>https://www.emblogic.com/blog/02/linux-filesystem/</link>
		<comments>https://www.emblogic.com/blog/02/linux-filesystem/#comments</comments>
		<pubDate>Tue, 09 Feb 2016 14:56:41 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[root]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13255</guid>
		<description><![CDATA[Linux Filesystem ================ - In windows, physical drive determines the pathname of the file. - Windows assigns a letter to each disk drive. - Each directory contains its own directory structure for accesing files stored in it. - For eg. &#8230; <a href="https://www.emblogic.com/blog/02/linux-filesystem/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Linux Filesystem<br />
================<br />
- In windows, physical drive determines the pathname of the file.<br />
- Windows assigns a letter to each disk drive.<br />
- Each directory contains its own directory structure for accesing files stored in it.<br />
- For eg. in windows filepath is as:<br />
c:\Users\ankur\Documents\Lessons.doc</p>
<p>- Linux does not use drive letters in pathnames like windows.<br />
- Linux stores files within a single directory structure, called a virtual directory.<br />
- Virtual directory contains filepaths from all storage devices installed on PC, mergedinto a single directory.<br />
- There is a single base directory, called the root.<br />
- root drive contains core of virtual directory.<br />
- On root drive, Linux has special directories called mount points.<br />
-When we start a new shell prompt, your session starts in your home directory.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/linux-filesystem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get help in Linux &#8211; Fedora</title>
		<link>https://www.emblogic.com/blog/02/how-to-get-help-in-linux-fedora/</link>
		<comments>https://www.emblogic.com/blog/02/how-to-get-help-in-linux-fedora/#comments</comments>
		<pubDate>Tue, 09 Feb 2016 14:54:58 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[info]]></category>
		<category><![CDATA[info page]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[man]]></category>
		<category><![CDATA[man page]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13253</guid>
		<description><![CDATA[To get help in fedora ===================== To learn about any new command, function or utility in Fedora we can get help from it. It has 3 such commands :- i) man pages &#8211; These are manual pages . - It &#8230; <a href="https://www.emblogic.com/blog/02/how-to-get-help-in-linux-fedora/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>To get help in fedora<br />
=====================<br />
To learn about any new command, function or utility in Fedora we can get help from it.<br />
It has 3 such commands :-</p>
<p>i) man pages &#8211; These are manual pages .<br />
- It contains interface to online reference manuals<br />
- Press q to exit.<br />
- How to Use ( Command ) &#8211; man command_name<br />
- for all man pages of BASH shell, use<br />
man bash<br />
- It generally contains following information about command(command_name) :-<br />
* Name<br />
* Synopsis (Prototype)<br />
* Description (Options)<br />
* Author (author of command)<br />
* Reporting Bugs (Feedback emails/Website)<br />
* Copyright (copyright details)<br />
* See Also (for further reference of command)</p>
<p>ii) Info pages &#8211; Read info documents<br />
- It contains BASH manuals.<br />
- Press q to exit<br />
- How to Use (command) &#8211; info command_name<br />
- It contains information about :-<br />
* Prototype<br />
* Introduction<br />
* Options<br />
* Exit Status<br />
iii) help command<br />
- It gives basic help for using a command and its various options.<br />
- It gives output on Standard Output.<br />
- It do not require exit command.<br />
- How to Use (command) &#8211; help command_name<br />
- It contains following information about command (command_name) :-<br />
* Function of command<br />
* Options<br />
* Exit status</p>
<p>eg.<br />
man echo<br />
info echo<br />
help echo</p>
<p>- To check total no. of enteries in each of three<br />
I) type either of three (with space at end)<br />
II) Press tab button for 3-4 times.<br />
We will get the total number of possible options defined or list of them also.<br />
eg. (&lt;tab&gt; means Press tab button)<br />
man &lt;tab&gt;&lt;tab&gt;&lt;tab&gt;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/how-to-get-help-in-linux-fedora/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to change default prompt in BASH shell</title>
		<link>https://www.emblogic.com/blog/02/how-to-change-default-prompt-in-bash-shell/</link>
		<comments>https://www.emblogic.com/blog/02/how-to-change-default-prompt-in-bash-shell/#comments</comments>
		<pubDate>Sun, 07 Feb 2016 15:46:40 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[change default prompt]]></category>
		<category><![CDATA[default prompt]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[PS1]]></category>
		<category><![CDATA[PS2]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[shell scripting]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13238</guid>
		<description><![CDATA[To change default prompt :- ======================== - We can change default prompt by assigning the character to it. - Each character have a specific meaning. BASH Shell Prompt Characters :- Character Description \a Bell Character \d Date in format &#8220;Day &#8230; <a href="https://www.emblogic.com/blog/02/how-to-change-default-prompt-in-bash-shell/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>To change default prompt :-<br />
========================<br />
- We can change default prompt by assigning the character to it.<br />
- Each character have a specific meaning.</p>
<p>BASH Shell Prompt Characters :-<br />
Character Description<br />
\a Bell Character<br />
\d Date in format &#8220;Day Month Date&#8221;<br />
\e ASCII escape character<br />
\h Local hostname<br />
\H Fully qualified domain hostname<br />
\j Number of jobs currently managed by the shell<br />
\l Basename of the shell&#8217;s terminal device name<br />
\n ASCII newline character<br />
\r ASCII carriage return<br />
\s Name of the shell<br />
\t Current time in 24-hour HH:MM:SS format<br />
\T Current time in 12-hour HH:MM:SS format<br />
\@ Current time in 12-hour am/pm format<br />
\u Username of current user<br />
\v Version of BASH shell<br />
\V Release level of bash shell<br />
\w Current working directory<br />
\W Basename of current working directory<br />
\# Command number of this command<br />
\$ A dollar sign if normal user, #(Pound) for root user<br />
/nnn Character corresponding to value nnn<br />
\\ Backslash<br />
\[ Begins a control code sequence<br />
/] Ends a control code sequence</p>
<p>eg.<br />
[ankur@(none) ~]$ PS1 = &#8220;[\t][\u]$&#8221;<br />
[15:20:30][ankur]$</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/how-to-change-default-prompt-in-bash-shell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Command line Prompt &#8211; PS1, PS2</title>
		<link>https://www.emblogic.com/blog/02/command-line-prompt-ps1-ps2/</link>
		<comments>https://www.emblogic.com/blog/02/command-line-prompt-ps1-ps2/#comments</comments>
		<pubDate>Sun, 07 Feb 2016 15:44:42 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command line prompt]]></category>
		<category><![CDATA[environmental variables]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[PS1]]></category>
		<category><![CDATA[PS2]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[shell scripting]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13236</guid>
		<description><![CDATA[Command line Prompt =================== Environmental variables that controls Command line Prompt PS1 : Controls the format of default command line prompt. PS2 : Controls the format of second-tier command line prompt. PS3 : Controls the format of tertiary command line &#8230; <a href="https://www.emblogic.com/blog/02/command-line-prompt-ps1-ps2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Command line Prompt<br />
===================<br />
Environmental variables that controls Command line Prompt<br />
PS1 : Controls the format of default command line prompt.<br />
PS2 : Controls the format of second-tier command line prompt.<br />
PS3 : Controls the format of tertiary command line prompt.</p>
<p>- Shell uses default PS1 prompt for initial data entry into shell.<br />
- If we enter a command that requires additional information, shell displays second-tier prompt specified by PS2 .<br />
- To display current settings for prompt use command :<br />
echo $PS1<br />
echo $PS2<br />
- PS3 is used only in shell scripts.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/command-line-prompt-ps1-ps2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
