Accidental echo [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
When I was setting up my Ubuntu environment, I think I mistyped and did something like this:
echo 'srouce /opt/whatever'
And now when I open terminal, the first line is always:
srouce: command not found
How can I get fix this issue?

Fix the misspelling in your shell startup files:
sed -i 's/srouce/source/' .bashrc .profile

Related

How to get bash PROMPT? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
We can use echo $PS1 to view
test#testauto:~$ echo $PS1
\[\e]0;\u#\h: \w\a\]${debian_chroot:+($debian_chroot)}\u#\h:\w\$
test#testauto:~$
But what I want is "test#testauto:~$" not "[\e]0;\u#\h: \w\a]${debian_chroot:+($debian_chroot)}\u#\h:\w$"
How can I get it?
For Bash
echo "${PS1#P}"
For ZSH
echo "${(%%)PS1}"
You can find more about this in this thread: How to print current bash prompt?

Error while trying to copy file to many files using cp [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
Error when running this command, i think the command is clear to get the idea.
cp file.txt /folder/*/*/*/file.txt
You need a loop to do that:
for dir in /folder/*/*/*/; do cp file.txt "$dir"; done

Standard contents of /etc/environment file in linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I'm running Linux Mint 14 and accidentally replaced the contents of /etc/environment file. It was originally something like:
PATH=/usr/bin
but with some extra stuff. At the moment, most commands don't work in the terminal. If I do "ls", I get "command not found". Does anyone know the standard contents of this file is?
On ubuntu 12.04 it is:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"

Unwanted message when opening the shell [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I just uninstalled a program (ros) from my computer (ubuntu) using the ubuntu software center.
However, since this moment, whenever I open a shell, I get the following message:
bash: /opt/ros/groovy/setup.bash: No such file or directory
Did I do anything wrong?
Have a look at ~/.bash_profile

How to solve "bash: ls: command not found" [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I did something wrong with PATH, so currently if I type ls command I get:
bash: ls: command not found
How can I solve it?
Restore $PATH. The easiest way to do this is to close the current shell and open a new one (assuming you didn't futz with the shell startup files and this is why it's broken).

Resources