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 06-18-2014, 03:30 PM   #1
suraj_thadarai
LQ Newbie
 
Registered: Aug 2012
Location: India
Distribution: Red Hat Linux
Posts: 6

Rep: Reputation: Disabled
Unhappy query regarding setting up aliases and the "source" command


Hi Guys,

I am using Red Hat Enterprise Linux 5 on
VMwareŽ Workstation Version 7.0.0 build-203739.

When i try to setup the alias in .bashrc file for rm command like this

alias rm = 'rm -i'


when running the .bashrc file through the source command system is throwing the message like below
[##################]$ source .bashrc
bash: alias: rm: not found
bash: alias: =: not found
bash: alias: rm -i: not found
 
Old 06-18-2014, 03:55 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,674
Blog Entries: 14

Rep: Reputation: 1021Reputation: 1021Reputation: 1021Reputation: 1021Reputation: 1021Reputation: 1021Reputation: 1021Reputation: 1021
There should be no space before or after the equal sign:

Enter:
alias rm='rm -i'

NOT:
alias rm = 'rm -i'
 
1 members found this post helpful.
Old 06-23-2014, 05:10 PM   #3
suraj_thadarai
LQ Newbie
 
Registered: Aug 2012
Location: India
Distribution: Red Hat Linux
Posts: 6

Original Poster
Rep: Reputation: Disabled
thanks for the solution sir
 
  


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
Query regarding performance-differences, in using a "servlet" VS "PHP module" ajaygarg Linux - Newbie 1 08-11-2013 07:03 AM
"chage" command query sheelavantar Linux - Newbie 5 01-15-2012 09:04 PM
[SOLVED] C Language Question "Thing" that changes aliases for source code? theKbStockpiler Programming 5 05-29-2010 04:11 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 11:18 PM
learned "aliases", what are "functions" in .bashrc? learnfast Linux - Newbie 3 03-15-2005 05:24 AM


All times are GMT -5. The time now is 09:53 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration