Terminal becomes unresponsive when I use “tail –f catalina.out” [closed] - terminal

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Setup: Mac OSX 10.6.8, Terminal 2.1.2 (273.1)
My Terminal sometimes becomes unresponsive after I enter certain commands. An example is when I put a tail on the catalina.out file though it happens at other times as well.
An example of the steps I take when im putting a tail on.
I go to the startup folder
cd /Applications/Tomcat/apache-tomcat-6.0.16/bin
Enter the start command
sh startup.sh
Go to my logs folder
cd /Applications/Tomcat/apache-tomcat-6.0.16/logs
And put a tail on the catalina.out file
tail -f catalina.out
This all works fine and the terminal window displays the processes as they are being used. However, if I try to type something else in Terminal it becomes unresponsive. If I press the Up or Down arrow to get list the previous commands all I get is for UP is "^[[A" and "^[[B" for DOWN.
When I type e.g. "cd .." and press enter nothing happens
Why does Terminal become unresponsive and how can I make it execute my commands? At the moment I have to quite Terminal each time this happened which is a bit annoying.

don't use tail -f
Instead when you want to run it instead of
sh startup.sh
run:
sh catalina.sh run
It will log everything to the window.
OR you can just open another terminal and do your tail -f from there!

Related

Clean up terminal misstakes [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
I am new to the terminal and was trying to install Java.
Also attempted to use homebrew, have since uninstalled.
Now everytime I open the terminal I have three lines
-bash: /opt/homebrew/bin/brew: No such file or directory
-bash: nexport: command not found
-bash: nexport: command not found
How do i remove?
Thanks
Find the Cause
First you should find the source of those commands that are automatically executed every time you log in. Usually there are files that are being executed after every login, depending on your OS it can be a bash script like bashrc in your home directory.
So first try to find the file where these commands are executed but fail:
cd ~ && grep -rnw 'nexport'
This should give you the file where nexport is executed like /home/user/bash_profile
If it does not find any file try this:
cd / && grep -nwirl 'nexport' 2>&-
This searches the whole system for nexport and prints all files where it occurs. (the extra parameter il will suppress all access-denied errors)
Same for brew (obviously)
Change affected file(s)
If you found a file, for example lets say its /home/user/bashrc assuming you have rights to write this file
type:
nano /home/user/bashr
to start editing this file using the easy-to-use, mostly preinstalled nano-editor
When editing the file type CTRL+W to start search mode and type nexport and press Enter.
It should jump to the line where nexport occurs. If it's the line you want to remove just go to its beginning and add a #.
Example:
/home/user/bash_rc#line:72
nexport foo/bar
change to:
#nexport foo/bar
to comment it out (always better than removing)
Press CTRL+X to save and try re-login.
When you installed Homebrew and then some of its packages, several configuration files have probably been modified. You need to restore them. Look maybe at /etc/profile, /etc/bashrc, /Users/<yourself>/.bashrc (replace <yourself> by your username), /Users/<yourself>/.bash_profile and /Users/<yourself>/.profile.
How to check? Try something like this:
$ grep -El '(brew|nexport)' /etc/{bashrc,profile} ~/{.bashrc,.bash_profile,.profile}
If something shows up you found the culprit. By the way, did you search the Homebrew documentation for "uninstall"?

Export command not found on mac terminal [duplicate]

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 added something to my bash_profile while trying to add Playframework to my path and something got messed up badly.
I added the following line to my .bash_profile
export PATH=$PATH:the path to my play excitable
then I saved everything and restarted my terminal. I can no longer do anything from my terminal. I can't cd into any directory, I can no longer find java, I can't open vi or nano.
I found this thread on SuperUser that suggested opening a different terminal and changing the bash profile.
I tried opening bash by typing
/bin/bash
and I was successfully able to open another terminal but I still don't have access to any of the regular unix commands. I still wasn't able to open vi or nano to remove the line that is causing the problem.
I tried downloading a new terminal application without any luck.
I tried turning on hidden files so that I can just change the file with a text editor by running the following command:
defaults write com.apple.finder AppleShowAllFiles TRUE
but since my terminal isn't working that didn't work either.
How can I fix my computer.
While this is offtopic for stackoverflow, it's also pretty simple to fix:
Start Terminal.app.
Reset $PATH:
$ export PATH=/bin:/usr/bin:/usr/local/bin
Fix ~/.bash_profile:
$ vi ~/.bash_profile
Or you can avoid setting $PATH at all with:
$ /usr/bin/vi ~/.bash_profile

How to restore .bash_profile on a mac? None of my unix terminal are working [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 added something to my bash_profile while trying to add Playframework to my path and something got messed up badly.
I added the following line to my .bash_profile
export PATH=$PATH:the path to my play excitable
then I saved everything and restarted my terminal. I can no longer do anything from my terminal. I can't cd into any directory, I can no longer find java, I can't open vi or nano.
I found this thread on SuperUser that suggested opening a different terminal and changing the bash profile.
I tried opening bash by typing
/bin/bash
and I was successfully able to open another terminal but I still don't have access to any of the regular unix commands. I still wasn't able to open vi or nano to remove the line that is causing the problem.
I tried downloading a new terminal application without any luck.
I tried turning on hidden files so that I can just change the file with a text editor by running the following command:
defaults write com.apple.finder AppleShowAllFiles TRUE
but since my terminal isn't working that didn't work either.
How can I fix my computer.
While this is offtopic for stackoverflow, it's also pretty simple to fix:
Start Terminal.app.
Reset $PATH:
$ export PATH=/bin:/usr/bin:/usr/local/bin
Fix ~/.bash_profile:
$ vi ~/.bash_profile
Or you can avoid setting $PATH at all with:
$ /usr/bin/vi ~/.bash_profile

Bash doesn't works for new user [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I've just created a new user in my machine with adduser --system --group studio for audio purposes, and everything went ok until I've tried to open a terminal, which opened and closed immediately.
I've tried using other terminals (xfce4-terminal, Xterm and UXterm) and the problem persisted.
Then I've tried logging in a tty, which showed a strange behavior: it logs in, shows that message Last login: bla bla bla, and quickly comes back to login screen. So I think the problem is with bash and this specific user. Logging on a tty with the older user still works.
I've also tried creating the files .bashrc and .profile (actually copying them from the working user), but it didn't fixed the problem either.
This is a very strange behavior for me, and I've never seen this before. As I can't access any shell from this user, I'm not able to diagnose the problem. I've checked dmesg and all logs possible and nothing shows up when the error happens. I'm using Debian Wheezy and XFCE4. My uname -a is:
Linux t4rkus-nb 3.2.0-4-rt-686-pae #1 SMP PREEMPT RT Debian 3.2.35-2 i686 GNU/Linux
Why are you passing the --system flag? From the manpage:
The new system user will have the shell /bin/false (unless overridden
with the --shell option), and have logins disabled. Skeletal
configuration files are not copied.
Meaning the new user has /bin/false as the shell, which immediately exists when you try to log in with it.

How do you open a new Mac OS X Terminal from Terminal and have it be in the same directory? (Snow Leopard) [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I want to open a new terminal window from my current window. (like command+n opens a new terminal window that is in the same directory from the window I spawned it in). This has always annoyed me so today I want to solve it. Some bash script like
start /Applications/Utilities/Terminal.app -D CurrentDirectory
might work.
Also, my Lion machine does this automatically. I have Snow Leopard and I've searched through all the terminal preferences and the internet.
Try:
open -a Terminal "`pwd`"
This works for me (on Lion) but provided you can run that command, it should work on Snow Leopard, I believe.
In your current Terminal window
pwd | pbcopy
Command-N to create a new window
cd "`pbpaste`"
The double quotes are necessary in case there is a space in your path, although I didn't test it.
The inner single quotes is the backtick character. It should work if you copy and paste the commands from my answer.
If you spend a lot of time in Terminal, consider using iTerm 2. It's got some great enhancements over Apple's Terminal.app.

Resources