LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 04: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, 05:41 PM   #2
vtel57
Senior Member
 
Registered: Jul 2006
Location: USA
Distribution: Slackware64 - 14.2 w/ Xfce
Posts: 1,631

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
Code:
cd /usr ; ls
 
1 members found this post helpful.
Old 04-15-2011, 05: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, 07: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, 08: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, 09: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, 09:41 PM   #7
vtel57
Senior Member
 
Registered: Jul 2006
Location: USA
Distribution: Slackware64 - 14.2 w/ Xfce
Posts: 1,631

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

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Mark the thread as solved.
 
1 members found this post helpful.
Old 04-16-2011, 10: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, 11:00 AM   #10
vtel57
Senior Member
 
Registered: Jul 2006
Location: USA
Distribution: Slackware64 - 14.2 w/ Xfce
Posts: 1,631

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

Regards,

~Eric
 
Old 04-16-2011, 02: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



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 07:00 AM
bashrc file LinuxUser101 Linux - Newbie 4 04-14-2008 07:55 PM
Bashrc file Gins Linux - General 19 09-06-2005 03:19 PM
bashrc file Linvilidiot Linux - Newbie 3 03-11-2004 04:08 PM

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

All times are GMT -5. The time now is 01:48 AM.

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
Open Source Consulting | Domain Registration