<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8938684703177896757</id><updated>2011-11-27T16:43:16.931-08:00</updated><category term='Linux'/><title type='text'>Linux Interview Questions - An interviewhelper.org blog</title><subtitle type='html'>This blog contains common Linux interview questions asked by different organizations.&lt;br&gt;&lt;br&gt;
For more such interview questions, please visit our website &lt;a href="http://interviewhelper.org"&gt;Interview Helper&lt;/a&gt;........&lt;a href="http://interviewhelper.org"&gt;&lt;img src="http://interviewhelper.org/images/interviewhelper.jpg" width="200" height="73" border="0"&gt;&lt;/a&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://linux-interview-questions.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8938684703177896757/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://linux-interview-questions.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Interview Helper</name><uri>http://www.blogger.com/profile/00019571984377897004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='12' src='http://1.bp.blogspot.com/_AdNUW2U2OOs/SYHHT9_iGqI/AAAAAAAAAAM/PzlYVvYWMac/s1600-R/interviewhelper.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8938684703177896757.post-5594272480982805988</id><published>2009-03-02T22:52:00.000-08:00</published><updated>2009-03-02T22:53:45.168-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>What does the following command line produce  Explain each aspect of this line</title><content type='html'>&lt;strong&gt;Question :What does the following command line produce? Explain each aspect of this line&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;$ (date ; ps -ef awk ‘{print $1}’ sort uniq wc -l ) &gt;&gt; Activity.log&lt;br /&gt;&lt;/strong&gt;Answer :First let’s dissect the line: The date gives the date and time as the first command of the line, this is followed by the a list of all running processes in long form with UIDs listed first, this is the ps -ef. These are fed into the awk which filters out all but the UIDs; these UIDs are piped into sort for no discernible reason and then onto uniq (now we see the reason for the sort - uniq only works on sorted data - if the list is A, B, A, then A, B, A will be the output of uniq, but if it’s A, A, B then A, B is the output) which produces only one copy of each UID. These UIDs are fed into wc -l which counts the lines - in this case the number of distinct UIDs running processes on the system. Finally the results of these two commands, the date and the wc -l, are appended to the file "Activity.log". Now to answer the question as to what this command line produces. This writes the date and time into the file Activity.log together with the number of distinct users who have processes running on the system at that time. If the file already exists, then these items are appended to the file, otherwise the file is created&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8938684703177896757-5594272480982805988?l=linux-interview-questions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-interview-questions.blogspot.com/feeds/5594272480982805988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-interview-questions.blogspot.com/2009/03/what-does-following-command-line.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8938684703177896757/posts/default/5594272480982805988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8938684703177896757/posts/default/5594272480982805988'/><link rel='alternate' type='text/html' href='http://linux-interview-questions.blogspot.com/2009/03/what-does-following-command-line.html' title='What does the following command line produce  Explain each aspect of this line'/><author><name>Interview Helper</name><uri>http://www.blogger.com/profile/00019571984377897004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='12' src='http://1.bp.blogspot.com/_AdNUW2U2OOs/SYHHT9_iGqI/AAAAAAAAAAM/PzlYVvYWMac/s1600-R/interviewhelper.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8938684703177896757.post-2648307205103777339</id><published>2009-03-02T22:51:00.000-08:00</published><updated>2009-03-02T22:52:25.264-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>What is the most graceful way to get to run level single user mode</title><content type='html'>&lt;strong&gt;Question :What is the most graceful way to get to run level single user mode?&lt;/strong&gt;&lt;br /&gt;Answer :The most graceful way is to use the command init s. If you want to shut everything down before going to single user mode then do init 0 first and from the ok prompt do a boot -s.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8938684703177896757-2648307205103777339?l=linux-interview-questions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-interview-questions.blogspot.com/feeds/2648307205103777339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-interview-questions.blogspot.com/2009/03/what-is-most-graceful-way-to-get-to-run.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8938684703177896757/posts/default/2648307205103777339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8938684703177896757/posts/default/2648307205103777339'/><link rel='alternate' type='text/html' href='http://linux-interview-questions.blogspot.com/2009/03/what-is-most-graceful-way-to-get-to-run.html' title='What is the most graceful way to get to run level single user mode'/><author><name>Interview Helper</name><uri>http://www.blogger.com/profile/00019571984377897004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='12' src='http://1.bp.blogspot.com/_AdNUW2U2OOs/SYHHT9_iGqI/AAAAAAAAAAM/PzlYVvYWMac/s1600-R/interviewhelper.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8938684703177896757.post-2726285793821372551</id><published>2009-03-02T22:49:00.000-08:00</published><updated>2009-03-02T22:50:07.271-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Write a command to find all of the files which have been accessed within the last 30 days</title><content type='html'>&lt;strong&gt;Question :Write a command to find all of the files which have been accessed within the last 30 days?&lt;/strong&gt;&lt;br /&gt;Answer :find / -type f -atime -30 &gt; December.files This command will find all the files under root, which is ‘/’, with file type is file. ‘-atime -30′ will give all the files accessed less than 30 days ago. And the output will put into a file call December.files.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8938684703177896757-2726285793821372551?l=linux-interview-questions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-interview-questions.blogspot.com/feeds/2726285793821372551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-interview-questions.blogspot.com/2009/03/write-command-to-find-all-of-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8938684703177896757/posts/default/2726285793821372551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8938684703177896757/posts/default/2726285793821372551'/><link rel='alternate' type='text/html' href='http://linux-interview-questions.blogspot.com/2009/03/write-command-to-find-all-of-files.html' title='Write a command to find all of the files which have been accessed within the last 30 days'/><author><name>Interview Helper</name><uri>http://www.blogger.com/profile/00019571984377897004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='12' src='http://1.bp.blogspot.com/_AdNUW2U2OOs/SYHHT9_iGqI/AAAAAAAAAAM/PzlYVvYWMac/s1600-R/interviewhelper.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8938684703177896757.post-9164822943130784647</id><published>2009-03-02T22:48:00.000-08:00</published><updated>2009-03-02T22:49:16.022-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>What is the main advantage of creating links to a file instead of copies of the file</title><content type='html'>&lt;strong&gt;Question :What is the main advantage of creating links to a file instead of copies of the file?&lt;/strong&gt;&lt;br /&gt;Answer :The main advantage is not really that it saves &lt;a href="http://interviewhelper.org/Art/664/82/Linux-Interview-Questions.html" target="_top"&gt;disk space&lt;/a&gt; (though it does that too) but, rather, that a change of permissions on the file is applied to all the link access points. The link will show permissions of lrwxrwxrwx but that is for the link itself and not the access to the file to which the link points. Thus if you want to change the permissions for a command, such as su, you only have to do it on the original. With copies you have to find all of the copies and change permission on each of the copies.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8938684703177896757-9164822943130784647?l=linux-interview-questions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-interview-questions.blogspot.com/feeds/9164822943130784647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-interview-questions.blogspot.com/2009/03/what-is-main-advantage-of-creating.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8938684703177896757/posts/default/9164822943130784647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8938684703177896757/posts/default/9164822943130784647'/><link rel='alternate' type='text/html' href='http://linux-interview-questions.blogspot.com/2009/03/what-is-main-advantage-of-creating.html' title='What is the main advantage of creating links to a file instead of copies of the file'/><author><name>Interview Helper</name><uri>http://www.blogger.com/profile/00019571984377897004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='12' src='http://1.bp.blogspot.com/_AdNUW2U2OOs/SYHHT9_iGqI/AAAAAAAAAAM/PzlYVvYWMac/s1600-R/interviewhelper.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8938684703177896757.post-8557749843794077122</id><published>2009-03-02T22:47:00.000-08:00</published><updated>2009-03-02T22:48:11.356-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>What is LILO</title><content type='html'>&lt;strong&gt;Question :What is LILO?&lt;/strong&gt;&lt;br /&gt;Answer :LILO stands for Linux boot loader. It will load the MBR, master boot record, into the memory, and tell the system which partition and &lt;a href="http://interviewhelper.org/Art/664/82/Linux-Interview-Questions.html" target="_top"&gt;hard drive&lt;/a&gt; to boot from.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8938684703177896757-8557749843794077122?l=linux-interview-questions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linux-interview-questions.blogspot.com/feeds/8557749843794077122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linux-interview-questions.blogspot.com/2009/03/what-is-lilo.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8938684703177896757/posts/default/8557749843794077122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8938684703177896757/posts/default/8557749843794077122'/><link rel='alternate' type='text/html' href='http://linux-interview-questions.blogspot.com/2009/03/what-is-lilo.html' title='What is LILO'/><author><name>Interview Helper</name><uri>http://www.blogger.com/profile/00019571984377897004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='12' src='http://1.bp.blogspot.com/_AdNUW2U2OOs/SYHHT9_iGqI/AAAAAAAAAAM/PzlYVvYWMac/s1600-R/interviewhelper.jpg'/></author><thr:total>0</thr:total></entry></feed>
