LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-15-2011, 05:43 PM   #1
BMan8577
Member
 
Registered: Apr 2011
Posts: 73

Rep: Reputation: 0
Question Joining two commands in the .bashrc file...


I am a newbie attending class in the Redhat Academy Website. I was wondering how can you join the two commands of cd/usr & ls successfully in the .bashrc file? Someone please answer to this post thanks.
 
Old 04-15-2011, 06:41 PM   #2
vtel57
Member
 
Registered: Jul 2006
Location: VPN Tunnel, USA
Distribution: Slackware64
Posts: 931

Rep: Reputation: 113Reputation: 113
Code:
cd /usr ; ls
 
1 members found this post helpful.
Old 04-15-2011, 06:57 PM   #3
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Can also use

cd /var && ls
 
1 members found this post helpful.
Old 04-15-2011, 08:46 PM   #4
BMan8577
Member
 
Registered: Apr 2011
Posts: 73

Original Poster
Rep: Reputation: 0
I then type bash to show the listing of the last command as shown ( [username@username ~]$ bash ) correct?
 
Old 04-15-2011, 09:04 PM   #5
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Can you please tell us exactly what you are trying to perform/achieve?

In the first post you mentioned that you want to know how to concatenate two commands and you wanted to add that line in .bashrc file.

Are you trying to automate/get a process to load at startup?

or

Please let us know exactly as to what you are trying to test so that we can help.
 
Old 04-15-2011, 10:05 PM   #6
BMan8577
Member
 
Registered: Apr 2011
Posts: 73

Original Poster
Rep: Reputation: 0
I received the output I needed. Thanks
 
Old 04-15-2011, 10:41 PM   #7
vtel57
Member
 
Registered: Jul 2006
Location: VPN Tunnel, USA
Distribution: Slackware64
Posts: 931

Rep: Reputation: 113Reputation: 113
Please remember to give us credit on your homework assignment.
 
1 members found this post helpful.
Old 04-16-2011, 09:51 AM   #8
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
Mark the thread as solved.
 
1 members found this post helpful.
Old 04-16-2011, 11:48 AM   #9
BMan8577
Member
 
Registered: Apr 2011
Posts: 73

Original Poster
Rep: Reputation: 0
I give you guys all the credit for helping me I really appreciate it. And also thanks for letting me know to make the thread as solved...lol.
 
Old 04-16-2011, 12:00 PM   #10
vtel57
Member
 
Registered: Jul 2006
Location: VPN Tunnel, USA
Distribution: Slackware64
Posts: 931

Rep: Reputation: 113Reputation: 113
Good luck with your learning. Have fun with it!

Regards,

~Eric
 
Old 04-16-2011, 03:57 PM   #11
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ BMan8577

All the best for your learning

Enjoy Linux!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problems with .bashrc /commands arent working. davestom Linux - Newbie 3 09-19-2009 08:00 AM
bashrc file LinuxUser101 Linux - Newbie 4 04-14-2008 08:55 PM
Bashrc file Gins Linux - General 19 09-06-2005 04:19 PM
bashrc file Linvilidiot Linux - Newbie 3 03-11-2004 05:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration