<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Filesystem Hierarchy Standard on Amit Agarwal Linux Blog</title>
    <link>/tags/filesystem-hierarchy-standard/</link>
    <description>Recent content in Filesystem Hierarchy Standard on Amit Agarwal Linux Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Wed, 11 Jul 2012 05:51:39 +0000</lastBuildDate>
    
	<atom:link href="/tags/filesystem-hierarchy-standard/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>colorgcc – Color your compiler output on Fedora</title>
      <link>/2012/07/11/colorgcc-color-compiler-output-fedora/</link>
      <pubDate>Wed, 11 Jul 2012 05:51:39 +0000</pubDate>
      
      <guid>/2012/07/11/colorgcc-color-compiler-output-fedora/</guid>
      <description>&lt;p&gt;Lets start with installing colorgcc :&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;sudo yum install colorgcc&lt;/pre&gt;
&lt;p&gt;Now once that is done, you will need to ensure that the call to &lt;a class=&#34;zem_slink&#34; title=&#34;GNU Compiler Collection&#34; href=&#34;http://gcc.gnu.org&#34; rel=&#34;homepage&#34; target=&#34;_blank&#34;&gt;g++&lt;/a&gt;, gcc and others that you want to use, you will need to create a link in the “~&lt;a class=&#34;zem_slink&#34; title=&#34;Filesystem Hierarchy Standard&#34; href=&#34;http://www.linuxfoundation.org/en/FHS&#34; rel=&#34;homepage&#34; target=&#34;_blank&#34;&gt;/bin&lt;/a&gt;” directory, like so:&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;for i in g++ gcc c++ cc 
do
    ln -s $(which colorgcc) ~/bin/$i
done&lt;/pre&gt;
&lt;p&gt;The one liner above will create the links for &lt;strong&gt;colorgcc&lt;/strong&gt; as **** your favourite compiler in your homedir. Don’t forget to add the bin diretory to your PATH variable:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Creating a chroot environment – the script.</title>
      <link>/2011/09/23/creating-chroot-environment-script/</link>
      <pubDate>Fri, 23 Sep 2011 09:47:48 +0000</pubDate>
      
      <guid>/2011/09/23/creating-chroot-environment-script/</guid>
      <description>&lt;p&gt;Here is the script, very simple and effective 🙂&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;#!/bin/bash -
#===============================================================================
#
#          FILE:  mkchroot.sh
#
#         USAGE:  ./mkchroot.sh
#
#   DESCRIPTION:  Make a  chroot environ and cd to it
#
#       OPTIONS:  ---
#  REQUIREMENTS:  ---
#          BUGS:  ---
#         NOTES:  ---
#        AUTHOR: Amit Agarwal (aka), 
#       CREATED: 09/03/2011 02:53:37 PM IST
# Last modified: Sat Sep 03, 2011  03:11PM
#      REVISION:  ---
#===============================================================================

 binaries=( bash2 ls cat vi vim sudo)
#===  FUNCTION  ================================================================
#          NAME:  copy_binary
#   DESCRIPTION:  copy binary to chroot
#    PARAMETERS:
#       RETURNS:
#===============================================================================

copy_binary ()
{
   cmd=`which $1`
   echo $cmd
   cp $cmd bin/
   ldd $cmd
   while read line
   do
      while read ld
      do
         if [[ -f $ld ]]
         then
            echo copy $ld
            cp $ld lib/
            if [[ -L $ld ]]
            then
               ld1=$( ls -l $ld |sed &#39;s/.*&amp;gt; //&#39;)
               echo &#34;  copy $ld1&#34;
               cp  /lib/$ld1 lib/
            fi
         fi
      done &amp;lt; &amp;lt;(echo $line|sed &#39;s/.*&amp;gt; //&#39;|sed &#39;s/ .*//&#39;)
   done &amp;lt; &amp;lt;(ldd $cmd)
}	# ----------  end of function copy_binary  ----------

#===  FUNCTION  ================================================================
#          NAME:  init
#   DESCRIPTION:  Do the required initialization
#    PARAMETERS:
#       RETURNS:
#===============================================================================
init()
{
   mkdir -p {root,home,dev,etc,lib,usr,bin}
   mkdir -p usr/bin
   mkdir -p libexec/openssh



   mknod -m 666 dev/null c 1 3

   cd etc
   cp /etc/ld.so.cache .
   cp -avr /etc/ld.so.cache.d/ .
   cp -avr /etc/ld.so.conf.d/ .
   cp /etc/ld.so.conf .
   cp /etc/nsswitch.conf .
   cp /etc/passwd .
   cp /etc/group .
   cp /etc/hosts .
   cp /etc/resolv.conf .
   cd -
}
cd $1
if [[ -f .status ]]
then
   cat .status
   echo &#34;Not running now&#34;
else
   init
   for i in ${binaries[*]}
   do
       copy_binary $i
       cp -avr /etc/${i}* etc/
   done
   ln bin/bash2 bin/bash
   echo &#34;complete&#34; &amp;gt; .status
fi
cp -avr ~/bin/automation root/automation
sudo chroot .

&lt;/pre&gt;
&lt;p&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Installing Full Blin g theme on N900</title>
      <link>/2011/08/03/installing-full-blin-theme-n900/</link>
      <pubDate>Wed, 03 Aug 2011 03:53:57 +0000</pubDate>
      
      <guid>/2011/08/03/installing-full-blin-theme-n900/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;I was going through the post : &lt;a href=&#34;http://talk.maemo.org/showthread.php?t=46739&#34;&gt;http://talk.maemo.org/showthread.php?t=46739&lt;/a&gt;&lt;br&gt;
and found the theme quite intruging but not complete to the point where I can download the deb file and install it in /&lt;a class=&#34;zem_slink&#34; title=&#34;Filesystem Hierarchy Standard&#34; href=&#34;http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard&#34; rel=&#34;wikipedia&#34;&gt;usr&lt;/a&gt;/share/theme/ dir with simple commands “&lt;a class=&#34;zem_slink&#34; title=&#34;Advanced Packaging Tool&#34; href=&#34;http://wiki.debian.org/Apt&#34; rel=&#34;homepage&#34;&gt;apt-get&lt;/a&gt;” or at max just use &lt;a class=&#34;zem_slink&#34; title=&#34;Mkdir&#34; href=&#34;http://en.wikipedia.org/wiki/Mkdir&#34; rel=&#34;wikipedia&#34;&gt;mkdir&lt;/a&gt; command to create the dir and dump everything in that dir. So, I wrote this couple of bash one liners to copy the required files to my &lt;a class=&#34;zem_slink&#34; title=&#34;Nokia N900&#34; href=&#34;http://en.wikipedia.org/wiki/Nokia_N900&#34; rel=&#34;wikipedia&#34;&gt;N900&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Installing Bling Theme on N900</title>
      <link>/2011/06/19/installing-bling-theme-n900/</link>
      <pubDate>Sat, 18 Jun 2011 18:53:56 +0000</pubDate>
      
      <guid>/2011/06/19/installing-bling-theme-n900/</guid>
      <description>&lt;div class=&#34;zemanta-img&#34; style=&#34;margin: 1em; display: block;&#34;&gt;
  &lt;p&gt;
    &lt;figure style=&#34;width: 300px&#34; class=&#34;wp-caption alignright&#34;&gt;&lt;a href=&#34;https://i0.wp.com/commons.wikipedia.org/wiki/File:Nokia_N900-1.jpg&#34;&gt;&lt;img title=&#34;Nokia N900 communicator/internet tablet&#34; src=&#34;https://i2.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/zemanta//300px-Nokia_N900-11.jpg?resize=300%2C228&#34; alt=&#34;Nokia N900 communicator/internet tablet&#34; width=&#34;300&#34; height=&#34;228&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;figcaption class=&#34;wp-caption-text&#34;&gt;Image via Wikipedia&lt;/figcaption&gt;&lt;/figure&gt;
  &lt;/p&gt;
&lt;/div&gt;
&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;There is a very nice theme for N900 and it is called Bling theme. There is a problem though with the theme, the theme still does not have a installable &lt;a class=&#34;zem_slink&#34; title=&#34;Deb (file format)&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Deb_%28file_format%29&#34;&gt;.deb&lt;/a&gt; file, and thus the &lt;a class=&#34;zem_slink&#34; title=&#34;Computer file&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Computer_file&#34;&gt;files&lt;/a&gt; need to be directly copied to “/&lt;a class=&#34;zem_slink&#34; title=&#34;Filesystem Hierarchy Standard&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard&#34;&gt;usr&lt;/a&gt;/share/icons” and you have to manually do the &lt;a class=&#34;zem_slink&#34; title=&#34;Mkdir&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Mkdir&#34;&gt;mkdir&lt;/a&gt; and all such command in the terminal in a N900, which does not seem familiar to quite a lot of people using N900. So here, is for the benefit of  all, I am posting a script that can do the job. The one lines can be run from any bash script (Linus/Windows with cygwin/Mac or even N900). Though the one liners should be self explanatory, if you have a doubt, feel free to ping me.&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
