Red Hat / Fedora :: Edit In Bashrc File Now Cant Execute Commands?
May 30, 2011
recently I did some changes to my bashrc file the changes are as follows
export JAVA_HOME=/usr/java/jre<version>/bin/
export PATH=$PATH:/usr/java/jre<version>/bin
now I'm unable even login to the OS.
View 9 Replies
ADVERTISEMENT
Apr 15, 2011
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?
View 10 Replies
View Related
Apr 20, 2010
I am having a lil headache with it.
Some time ego i edited my /etc/bashrc file to add some aliases and colours for my ssh console.
Today i had a need to change few thing but for some reason i can't edit or delete this file any more.
I am logged as root.
rm bashrc
cannot remove, operation not permitted
chown and/or chmod fails as well with "not permitted" errors.
ls -Al | grep bashrc
-rw-r--r-- 1 root root 2514 mar 31 13:05 bashrc
Any ideas what's going on?
View 2 Replies
View Related
Feb 17, 2011
I'm looking to, all in the course of one batch file:
ssh into a remote computer execute commands (per the batch file) on the remote host.
What options do I need to add to the ssh invocation so that the batch file executes the lines following the ssh invocation over the connection?
e.g., with sftp it's simply adding a -b /dev/stdin and then << EOF at the end; how do I do this with SSH?
View 1 Replies
View Related
May 4, 2011
When I try execute a variety of basic commands (including ps, ls, ifconfig, locate), I receive the error 'no such file or directory'.
Here are some suggestions that I've found online, that I have tried without success: I did a 'whereis ps' and found the file in the /bin/, and have checked that '/bin' appears when I do 'echo $PATH' I did a filesystem check which showed my hard drive as being clean I tried doing a 'sudo chmod 777 ps' but was told that I dont have permission. I don't think permissions for these files would have changed though (and I can't check as I can't run the 'ls' command).
View 3 Replies
View Related
Feb 2, 2011
i am working on some kind of PBX and i have list of telephone numbers inside a file, i have to insert these numbers into the correct command and then telnet to a remote server and execute these commands. i can read the telephone numbers and insert them into the command with no problem, but when i try to insert these commands into the send i face problem. here is the basic code
#!/bin/bash
read msisdn < input
string="ZZZZ:MSISDN=$msisdn;"
[code]....
i can make external loop inside the Bash which read the input file and issue the command and then telnet and execute, but this will make the script connects and disconnects again for each line which cause high load on that server and hardwar problem. i am wondering if there is an option inside the expect interperter which makes the send read directly from a file... somthing like this:
expect "<"
send "input-filename
"
expect "<"
expect eof
View 1 Replies
View Related
Aug 16, 2010
since a recent upgrade to Mandriva 2010.1 I am not able to 'sudo' as administrator or when I use the 'root' password. I am the only user on this machine (Dell Inspiron 530S multi-booted with Window's Vista Home Premium, Ubuntu 10.4, and Mandriva 2010.1). I can get into the 'Manage Users' section of the control center by authenticating as 'root' but I can't access 'sudoers file' from command line.
View 4 Replies
View Related
May 4, 2011
I was looking at some Vim plugins, and I installed one called Abolish. The page from where I got it [URL] only says:
install details
Extract in ~/.vim or ~vimfiles
So I extracted it in ~/.vim. Now, the issue is that, if I edit a file as root, I am able to use the commands; however, when I edit a file as a normal user, these commands won't work. So... could this be a permissions issue? Or should I copy the plugin in some other directory, maybe?
View 6 Replies
View Related
Feb 27, 2011
I want something like
Code:
export ROS_PACKAGE_PATH=~/ros:$ROS_PACKAGE_PATH
to be done already for me when I open a new terminal. How do I edit the .bashrc so that this variable is always set already?
View 3 Replies
View Related
Aug 11, 2011
how to execute commands on startup. I've added lines to /etc/rc.d/rc.local, /etc/rc.local, I've put scripts (with extension .sh) into /etc/init.d/ and I've set the executable permission thing on all of them with chmod -x. I *still* can't get anything at all to execute on startup. The truth is, I'm trying to enable multitouch and button tapping automatically when I startup Fedora. I have the commands
[code]...
Which I want to execute whenever I start Fedora (it's a bit tedious to write them every time, or even to have to execute a script myself whenever I start my computer). Furthermore, if I can figure this out, then I can do all sorts of things. Does anyone have a clear, surefire way in which I can do this? I'm not good with using Linux at all
View 7 Replies
View Related
Jul 28, 2010
how to edit or add codes to ~/.bashrc?? and also what is this bashrc if anyone could explain... i have tried editing this bashrc without success... how to save the changes in bashrc...
View 5 Replies
View Related
Sep 17, 2010
I need to occasionally touch a file with the current timestamp as the filename. I would do so this way:
touch `date "+%Y-%m-%d_%H-%M"`.txt
However, I'd like to define an alias for this. When I try adding to the bashrc this:
alias td="touch `date "+%Y-%m-%d_%H-%M"`.txt"
the result is that the filename is the same during the entire session, since the `date ..` gets calculated just once during login...
How can I get the command to expand only when I call the alias? Or must I use a function for this?
View 1 Replies
View Related
Apr 26, 2011
I'd like to know if there is a way to define commands in the .bashrc or .bash_profile. For instance, I want to be able to type 'work' in a terminal and set up an interactive work environment on my universities cluster. (This is done with the command 'qsub -I -X'.) I tried the following in my .bashrc file:
alias work ='qsub -I -X'
But, of course this failed, as I don't have a command work already defined. How do I go about doing this? Also, I can't assign 'qsub' an alias, since it's used with different options quite extensively.
View 5 Replies
View Related
Oct 17, 2009
I just finished installing Fedora 11 on a Dell Inspiron 6000. After some tinkering, I was able to get the Broadcom 4318 wireless card to start working. After a restart, I booted into Fedora and attempted to connect to my wireless network.Five seconds later Fedora freezes. I cannot move the mouse, execute any commands (except hold the power button down), or access any log files. The only confirmation I get is that my router does receive a signal from the wireless card, shortly before dying.
View 1 Replies
View Related
Jun 14, 2011
When I add some path in .bashrc by commenting out old path and adding new one like this:
#EXPORT HOME_PLAY=/home/gem/old_play
EXPORT HOME_PLAY=/home/gem/play
EXPORT PATH=$PATH:HOME_PLAY
After saving above changes, I enter the command: source ~/.bashrc Now if I do echo $PATH, the path shows both the old PLAY_HOME and new PLAY_HOME. This is really bad and messes up a lot of things in my project. This problem only goes away if I logout or reboot, a rather very long process. What is happening is that the old path is added to new path element and the old path includes the old path element you want to remove.
View 10 Replies
View Related
Oct 6, 2010
how come I can create a shell script file with two functions, I can execute the file, but when running declare -f, the functions are not on memory, and when invoking the function bash returns invalid. In the other hand, I can copy & paste the two functions at the end of my /etc/bashrc file.... then I can called the function by name.... and the commands within that function run on my session. here is a print of all my bash packets:
[Code]....
Does Fedora has restrictions on shell scripting? I haven't touch bash in seven years, so if things have change on it I'm behind on it, and sorry for my ignorance.
View 1 Replies
View Related
Mar 3, 2011
I have a linux.img image for ubuntu.I want to edit file inside it, how can open it, edit a file, then remake the bin file?
View 7 Replies
View Related
May 14, 2010
I have a two seperate files on my computer,
which execfile
/usr/local/bin/
/usr/bin/
so, i have two files with the same name in two different directories. How can I specify exactly which command to run?
View 6 Replies
View Related
Nov 13, 2010
I have a script --> WEP.sh and i want to open severel new processes in a second shell.
gnome-terminal -e "airmon-ng check" #this is working... but is there any possibility to execute other commands in a row in that same newshell for example airmon-ng stop wlan1 or sleep 10 or echo....?
View 2 Replies
View Related
Jun 23, 2010
I just want to know that how can I execute a example.sh (script) from command-line like other Unix commands. Please write full procedure
View 4 Replies
View Related
Jan 13, 2011
I am executing a run command in a script after that i need to copy files into a directory which are the inputs for the run,on run a new shell is created and the remaining commands in the script does not execute,wot should i do to execute the remaining commands in the script??
View 2 Replies
View Related
Jun 10, 2010
Anyone know how to execute SQLite db commands from C++?
View 1 Replies
View Related
May 22, 2009
I am trying to determine if I should upgrade PHP's PEAR on my server. I am trying to check the version of PEAR currently installed. I am getting the following error when I use the pear -V command:Warning: realpath(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s)(/usr/share/pear:/usr/share/php) in System.php on line 459I tried adding /tmp to my php.ini file, but then when I use the pear -V command it doesn't do anything. I do not get any errors or anything.I am also trying to install symfony and have the same situation described above when I use the following command: pear cannel-discover pear.symfony-project.comDoes anyone have any thoughts? If not the solution, does anyone have any suggestions on how to begin troubleshooting this?
View 2 Replies
View Related
Jan 22, 2011
I'm trying to run multiple commands on things I have found, how can I achieve this? find . -exec cmd1; cmd2 does not seem to work; it instead runs cmd2 after cmd1 has been executed on every file.
View 2 Replies
View Related
Jan 13, 2011
Cant type anything when i attach to my screen by typing screen -r. It doesn't even say neokyle@server, the only thing i can get it to let me do is detach. I cant even kill it.
View 2 Replies
View Related
Sep 1, 2010
I have debian lenny, when I run an application is slow to load (example: iceweacel open and it takes, I can hold him iceweacel work normally), I tried to change from gnome to another and the same thing, went down some services (samba, squid) and nothing. I open a terminal and it takes, I want to duplicate it and do it fast. From a terminal without X (tty1) with root run mc and moves quickly, also run as root "sudo mc" and takes to boot.Any action done with sudo it takes to run.Can not be what it takes to make starting the applications, not the PC because it is new, and from one moment to another I began to pass this
View 2 Replies
View Related
Jul 29, 2010
I use a long mount command to mount a NAS drive but have to retype it every time I need to mount the drive. Because it is on my laptop I only need to mount the drive from time
View 4 Replies
View Related
Apr 30, 2010
Customer asked me to create a menu for linux he also asked me to do this: Open like a command like where a user can execute commands...so for this the users have sudo enabled. The code below works OK. But it has an issue when a command is executed but the command does not need sudo
Like for instance
Code:
cd /
sudo: cd: command not found
How can I allow a user to execute all commands when a command does not need sudo
Code:
echo -e "Press Control+C to finish"
#echo -e " "
while true;
do
read whichcmd?"Insert Command: "
sudo $whichcmd
done
View 3 Replies
View Related
Apr 9, 2009
I am trying to get F10 installed on L2 so that I can use the system the same way that I have been using L1 with F8. Specifically, I am using unison (with ssh) to crossload files between the desktop and the laptop. Unison works just fine when executed on the desktop crossloading to the F8 Laptop1. But when trying to do the same on L2, it hangs while trying to contact the server.Attempting to diagnose the problem has led me to ssh.I can use ssh to login to any of my systems from the desktop. E.g.,ssh delta
but attempting to execute a command via ssh simply hangs. E.g.,ssh delta "echo $PATH"
Both ssh login and ssh remote execution work fine when done to the F8 laptop 1.
I have installed tcsh on all systems and my login shell is csh (i.e., tcsh) on all machines.I have spent the better part of the last two days trying to find something but have failed. As far as I can tell, both L1 and L2 are configured identically:
firewall disabled
selinux disabled
and while I have not done a character-by-character comparison of the ssh and sshd configuration files, they appear (visually) to be the same, as shipped with the Fedora distribution.
I need some pointers on where to look for problems, etc.
View 5 Replies
View Related
Dec 21, 2010
I'm trying to get Expect to execute commands on a remote server using SSH with username/password authenticationMy current expect script is
Code:
#!/usr/bin/expect -f
spawn ssh -tq root@my_hostname "whoami"
[code]...
View 2 Replies
View Related