{"id":4048,"date":"2011-08-17T11:21:05","date_gmt":"2011-08-17T05:51:05","guid":{"rendered":"https:\/\/2thenew.online\/blog\/?p=4048"},"modified":"2016-12-19T15:19:23","modified_gmt":"2016-12-19T09:49:23","slug":"organizing-bashrc","status":"publish","type":"post","link":"https:\/\/2thenew.online\/blog\/organizing-bashrc\/","title":{"rendered":"Organizing &#8220;.bashrc&#8221;"},"content":{"rendered":"<p>I have been working on Linux for almost 3 years now and have grown to love it a lot. <\/p>\n<p>As with every linux user, the .bashrc file becomes cumbersome and difficult to maintain over a period of time, since there are a lot of project specific aliases, paths, etc<\/p>\n<p>So after working on a couple of projects, I started maintaining separate files for my environment settings. So I just had to create a separate project setting file:<\/p>\n<p>[bash]~\/.myProjectSettings[\/bash]<br \/>\n[bash]<br \/>\nalias myAlias1=&#8217;cd \/to\/project\/dir&#8217;<br \/>\nalias projectqa=&#8217;ssh to@qa&#8217;<br \/>\nalias projectDb=&#8217;mysql -u&lt;username&gt; -p&lt;password&gt; &lt;project_db_name&gt;&#8217;<br \/>\n[\/bash]<br \/>\nSo, everytime I had to add more project specific settings or separate my settings, I had to create a  new settings file and then source it in my .bashrc by adding this line<\/p>\n<p>[bash]. ~\/.myProjectSettings[\/bash]<\/p>\n<p>As you can guess, after doing this a couple of times, even this was becoming very tedious. <\/p>\n<p>So, I tried to follow the golden rule of convention over configuration. <\/p>\n<p>In my .bashrc, I added the following function :<br \/>\n[bash]<br \/>\nfunction sourceAllMySettings(){<br \/>\n\tFOLDER_TO_BE_SOURCED=~\/.mySettings\/<br \/>\n\tfor i in `find $FOLDER_TO_BE_SOURCED -type f`;<br \/>\n\tdo<br \/>\n\t\t. $i<br \/>\n\tdone;<br \/>\n}<br \/>\n##don&#8217;t forget to execute the function<br \/>\nsourceAllMySettings<br \/>\n[\/bash]<br \/>\nand placed all my setting files into the folder :<br \/>\n[bash]~\/.mySettings\/[\/bash]<\/p>\n<p>So, now if I have to add more settings to my .bashrc, I just create a new executable file in this folder and it gets automatically sourced.<\/p>\n<p>Goodbye messy .bashrc, welcome organized (segregated) settings \ud83d\ude42<\/p>\n<p>Regards<br \/>\n~~Himanshu Seth~~<br \/>\nhttps:\/\/2thenew.online<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have been working on Linux for almost 3 years now and have grown to love it a lot. As with every linux user, the .bashrc file becomes cumbersome and difficult to maintain over a period of time, since there are a lot of project specific aliases, paths, etc So after working on a couple [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":19,"footnotes":""},"categories":[1],"tags":[260,8],"class_list":["post-4048","post","type-post","status-publish","format-standard","hentry","category-technology","tag-linux","tag-ubuntu"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"I have been working on Linux for almost 3 years now and have grown to love it a lot. As with every linux user, the .bashrc file becomes cumbersome and difficult to maintain over a period of time, since there are a lot of project specific aliases, paths, etc So after working on a couple\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Himanshu Seth\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/2thenew.online\/blog\/organizing-bashrc\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Organizing \u201c.bashrc\u201d | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"I have been working on Linux for almost 3 years now and have grown to love it a lot. As with every linux user, the .bashrc file becomes cumbersome and difficult to maintain over a period of time, since there are a lot of project specific aliases, paths, etc So after working on a couple\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/2thenew.online\/blog\/organizing-bashrc\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Organizing \u201c.bashrc\u201d | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"I have been working on Linux for almost 3 years now and have grown to love it a lot. As with every linux user, the .bashrc file becomes cumbersome and difficult to maintain over a period of time, since there are a lot of project specific aliases, paths, etc So after working on a couple\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/organizing-bashrc\\\/#article\",\"name\":\"Organizing \\u201c.bashrc\\u201d | TO THE NEW Blog\",\"headline\":\"Organizing &#8220;.bashrc&#8221;\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/himanshu\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2011-08-17T11:21:05+05:30\",\"dateModified\":\"2016-12-19T15:19:23+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":3,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/organizing-bashrc\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/organizing-bashrc\\\/#webpage\"},\"articleSection\":\"Technology, Linux, Ubuntu\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/organizing-bashrc\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/organizing-bashrc\\\/#listItem\",\"name\":\"Organizing &#8220;.bashrc&#8221;\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/organizing-bashrc\\\/#listItem\",\"position\":3,\"name\":\"Organizing &#8220;.bashrc&#8221;\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/himanshu\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/himanshu\\\/\",\"name\":\"Himanshu Seth\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/organizing-bashrc\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/62e787d1a52267475ecb3fb2b7bea0715c3f4409cf080f75b5ee57e3bfa770a8?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Himanshu Seth\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/organizing-bashrc\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/organizing-bashrc\\\/\",\"name\":\"Organizing \\u201c.bashrc\\u201d | TO THE NEW Blog\",\"description\":\"I have been working on Linux for almost 3 years now and have grown to love it a lot. As with every linux user, the .bashrc file becomes cumbersome and difficult to maintain over a period of time, since there are a lot of project specific aliases, paths, etc So after working on a couple\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/organizing-bashrc\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/himanshu\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/himanshu\\\/#author\"},\"datePublished\":\"2011-08-17T11:21:05+05:30\",\"dateModified\":\"2016-12-19T15:19:23+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Organizing \u201c.bashrc\u201d | TO THE NEW Blog","description":"I have been working on Linux for almost 3 years now and have grown to love it a lot. As with every linux user, the .bashrc file becomes cumbersome and difficult to maintain over a period of time, since there are a lot of project specific aliases, paths, etc So after working on a couple","canonical_url":"https:\/\/2thenew.online\/blog\/organizing-bashrc\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/2thenew.online\/blog\/organizing-bashrc\/#article","name":"Organizing \u201c.bashrc\u201d | TO THE NEW Blog","headline":"Organizing &#8220;.bashrc&#8221;","author":{"@id":"https:\/\/2thenew.online\/blog\/author\/himanshu\/#author"},"publisher":{"@id":"https:\/\/2thenew.online\/blog\/#organization"},"datePublished":"2011-08-17T11:21:05+05:30","dateModified":"2016-12-19T15:19:23+05:30","inLanguage":"en-US","commentCount":3,"mainEntityOfPage":{"@id":"https:\/\/2thenew.online\/blog\/organizing-bashrc\/#webpage"},"isPartOf":{"@id":"https:\/\/2thenew.online\/blog\/organizing-bashrc\/#webpage"},"articleSection":"Technology, Linux, Ubuntu"},{"@type":"BreadcrumbList","@id":"https:\/\/2thenew.online\/blog\/organizing-bashrc\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog#listItem","position":1,"name":"Home","item":"https:\/\/2thenew.online\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/2thenew.online\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/organizing-bashrc\/#listItem","name":"Organizing &#8220;.bashrc&#8221;"},"previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/organizing-bashrc\/#listItem","position":3,"name":"Organizing &#8220;.bashrc&#8221;","previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/category\/technology\/#listItem","name":"Technology"}}]},{"@type":"Organization","@id":"https:\/\/2thenew.online\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/2thenew.online\/blog\/"},{"@type":"Person","@id":"https:\/\/2thenew.online\/blog\/author\/himanshu\/#author","url":"https:\/\/2thenew.online\/blog\/author\/himanshu\/","name":"Himanshu Seth","image":{"@type":"ImageObject","@id":"https:\/\/2thenew.online\/blog\/organizing-bashrc\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/62e787d1a52267475ecb3fb2b7bea0715c3f4409cf080f75b5ee57e3bfa770a8?s=96&d=mm&r=g","width":96,"height":96,"caption":"Himanshu Seth"}},{"@type":"WebPage","@id":"https:\/\/2thenew.online\/blog\/organizing-bashrc\/#webpage","url":"https:\/\/2thenew.online\/blog\/organizing-bashrc\/","name":"Organizing \u201c.bashrc\u201d | TO THE NEW Blog","description":"I have been working on Linux for almost 3 years now and have grown to love it a lot. As with every linux user, the .bashrc file becomes cumbersome and difficult to maintain over a period of time, since there are a lot of project specific aliases, paths, etc So after working on a couple","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/2thenew.online\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/2thenew.online\/blog\/organizing-bashrc\/#breadcrumblist"},"author":{"@id":"https:\/\/2thenew.online\/blog\/author\/himanshu\/#author"},"creator":{"@id":"https:\/\/2thenew.online\/blog\/author\/himanshu\/#author"},"datePublished":"2011-08-17T11:21:05+05:30","dateModified":"2016-12-19T15:19:23+05:30"},{"@type":"WebSite","@id":"https:\/\/2thenew.online\/blog\/#website","url":"https:\/\/2thenew.online\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/2thenew.online\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Organizing \u201c.bashrc\u201d | TO THE NEW Blog","og:description":"I have been working on Linux for almost 3 years now and have grown to love it a lot. As with every linux user, the .bashrc file becomes cumbersome and difficult to maintain over a period of time, since there are a lot of project specific aliases, paths, etc So after working on a couple","og:url":"https:\/\/2thenew.online\/blog\/organizing-bashrc\/","og:image":"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Organizing \u201c.bashrc\u201d | TO THE NEW Blog","twitter:description":"I have been working on Linux for almost 3 years now and have grown to love it a lot. As with every linux user, the .bashrc file becomes cumbersome and difficult to maintain over a period of time, since there are a lot of project specific aliases, paths, etc So after working on a couple","twitter:image":"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"4048","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-29 16:58:04","updated":"2024-02-29 09:28:21","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.online\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.online\/blog\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tOrganizing \u201c.bashrc\u201d\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/2thenew.online\/blog"},{"label":"Technology","link":"https:\/\/2thenew.online\/blog\/category\/technology\/"},{"label":"Organizing &#8220;.bashrc&#8221;","link":"https:\/\/2thenew.online\/blog\/organizing-bashrc\/"}],"_links":{"self":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts\/4048","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/comments?post=4048"}],"version-history":[{"count":0,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts\/4048\/revisions"}],"wp:attachment":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/media?parent=4048"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/categories?post=4048"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/tags?post=4048"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}