0
votes
2answers
52 views

Is it possible for a root user to watch others' shell session secretly in live?

I see a similar question on stackoverflow: http://stackoverflow.com/questions/1353253/linux-terminal-how-to-capture-or-watch-other-terminal-session Someone recommends conspy. However, it seems that ...
0
votes
1answer
38 views

'localhost' stoped working as an alias for '127.0.0.1' for SSHing into my VirtualBox VM from OSX. Why, and how to fix?

The question explains the problem. For months I've never had any problems along these lines. Then, yesterday morning, I couldn't get into my VM! Took a long time to troubleshoot but here was the ...
0
votes
0answers
20 views

Running Custom commands in a Terminal Application

I am running a terminal application in /dev/pts/X terminal that has its own console as sampleapp> what I need is to run commands specific to this application but from another terminal.
0
votes
0answers
14 views

-bash: java: command not found MacOS 10.7.5

I recently "uninstalled" Java 7 because it isn't compatible with Chrome, following the instructions on this site: https://www.java.com/en/download/help/mac_uninstall_java.xml. Then I re-enabled Java ...
3
votes
4answers
142 views

Terminal: prefix previous command?

Frequently in Terminal (though I fully expect any answer will work in bash and most others), I type some command, and then get some sort of permission error due to missing sudo. Okay, so press 'up', ...
2
votes
2answers
64 views

How can I execute a command and immediately quit the terminal?

It should be pretty clear what I'm trying to do: original script.sh: select blah in foo bar oof rab do cmd $blah break done Pretty basic stuff. The problem arises when I try the following: ...
2
votes
2answers
49 views

sed error when launching terminal on OS X

I get these error messages when launching bash or zsh in standard Terminal.app or iTerm2 sed: 1: "\#^system_type=# { s#^s ...": extra characters at the end of p command sed: 1: "\#^system_type=# { ...
0
votes
1answer
22 views

.bashrc used in gnome not just terminal

I've recently started using the Anaconda Python distribution for software development and I want it to be the default Python distribution when I run something in the terminal. In order to do this, ...
1
vote
2answers
35 views

SSH TERM detection

My ssh config file has accept env set as: AcceptEnv LANG LC_* I am a bit confused how when I ssh through some clients my TERM variable is set as xterm256-color, and other clients TERM is set as ...
1
vote
1answer
22 views

redirect one bash line to stdout/terminal vs log

I have a bash script where I'm redirecting output into a file for logging. if test -t 1; then # stdout is a terminal exec > $OUTPUT_FILE 2>&1 else # stdout is not a terminal, no ...
0
votes
0answers
10 views

sac2xy not executable on terminal osx 10.9

file sac2xy sac2xy: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped ls -l sac2xy -rwxrwxrwx 1 ravi staff 50334 ...
0
votes
0answers
11 views

How to prevent MacVim from inherenting .profile as if it was Bash itself?

I have this guard in my .profile: if [ -n "$BASH_VERSION" ]; then if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi if [ -f "$HOME/.bash_aliases" ]; then . ...
1
vote
2answers
17 views

Can't run the Python interpreter in Mac's Terminal

At the moment i'm on Mavericks, and i just uninstalled homebrew. With homebrew i had installed python, but after uninstalling it my terminal can't start the python interpreter. I receive this message: ...
0
votes
1answer
34 views

Directories will list, but are not recognize by cd

New to terminal and having problems out of the gate. Using Terminal 2.1.2 on a Mac running 10.6.8. Using the "ls Documents" will list the contents, but when I try to change directories, which I tried ...
0
votes
0answers
20 views

Start terminator terminal in a free spot on my screen

When I start the default Ubuntu terminal, it automatically puts the new terminal in a spot on the screen where no other terminals are there. Now I set terminator as my default terminal. But whenever ...
0
votes
2answers
57 views

Unable to create a permanent alias in Mac OS

In Linux I can well to add alias to bashrc and it will become a permanent alias. In Mac OS I tried to do the same thing: vim ~/.bashrc export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH f or ...
1
vote
1answer
17 views

Is there any way to redraw the text in a terminal window after resizing it?

Just a usability question really. You know when you are working in a terminal window and you decide to do some query that brings back a wall of text and you think to yourself... "that would be easier ...
0
votes
0answers
36 views

Detaching from a GNU Screen suddenly clears the terminal

I feel so stupid for asking this, but here goes: I updated my Ubuntu (Server) install today from 13.10 to 14.04. Before the upgrade detaching from screen did not clear the terminal and now it does. ...
0
votes
1answer
52 views

Issue with RVM conflicting with Brew?

Please bare with me as I am not an expert on bash. In fact I'm fairly new to OSX < 1 year. I ultimately would like your help to get my system configured optimally, thus removing unnecessary tools. ...
-1
votes
2answers
77 views

How can I change the “/” path in linux [closed]

When I type cd /, it changes my directory to a default one. How can I override the current settings so that / points to a different directory.
0
votes
2answers
24 views

Copy shell configuration from one machine to another?

I've got login to another server where shell configurations are not like I would want. For example I don't see my username and CWD on prompt, and when I press arrow key, instead of giving last entered ...
0
votes
0answers
95 views

Local echo using Screen to connect to a serial terminal

Reading through the book "Building Wireless Sensor Networks" I learned that you can use the Screen utility to attach to a serial console. I tried using it to connect to an XBee module and it seemed ...
0
votes
0answers
33 views

How to open a local file with a query string appended to it in the default browser?

I want to do something like this from a shell script: $ open 'foo.html?foo=bar' Sadly that fails, as it looks for a file named foo.html?foo=bar instead of foo.html before opening the browser: The ...
0
votes
0answers
25 views

Connecting to ssh and using screen not working properly

I used once ssh -t <login@server> screen -R to connect to a server and everything worked fine. I used the terminal in the server to execute an script and then detach the screen. I came back ...
3
votes
1answer
64 views

Why does my .bashrc get read when I run noninteractive commands over ssh

I've prepended each of my bash config files (~/.bashrc,~/.bash_profile,~/.profile) with echo NAME_OF_FILE, i.e. I get '.bashrc' when I source in ~/.bashrc. What baffles me is why I get and ...
2
votes
2answers
58 views

My cursor is at the beginning of my bash prompt. Any ideas why?

I'm using a slightly modified version of Gary Bernhardt's (destroyallsoftware.com) .bashrc with homebrew bash 3.2.51. # . ~/bin/bash_colors.sh . ~/bin/colorize.sh [... snipped ...] # ...
0
votes
0answers
52 views

Script to open mutliple terminals with multiple tabs each, move and resize these and execute commands

So I am trying to make a bashscript, which does the above mentioned. Background is that I have to keep an eye on lots of logs, and theres have to have opened many console side-by-side. E.g. one ...
1
vote
0answers
42 views

Terminal's bin/bash not responding

I have Googled through several instances of this issue but cannot get Terminal to open up with bash. I restarted the program, the computer and even logged in through another Administrator account but ...
0
votes
1answer
37 views

find files older than create its parent folder in a directory and move them there

I've been trying to create a bash script that does the following. Use the find command to search for files older than 7 days (find . -type f -mtime +7 ! -iname '.*', take the parent directory(of the ...
0
votes
1answer
670 views

$PATH - No such file or directory MAC OSX - Terminal

A million different version of this have been asked already, but I'm still lost, sorry. Here is some of what I'm getting back... In a terminal: $PATH -bash: ...
0
votes
0answers
30 views

Automate whois lookup with Automator

I would like to automate a whois query script using automator. And as I have read from a past Q&A, I've already done this: Get Specified Text xxx.xxx.xxx.xxx Run Shell Script for x in "$@"; ...
1
vote
1answer
24 views

Avoid command dump on terminal when hitting 'Ctrl' twice

Whenever I hit Ctrl twice in my terminal, a list of all the possible commands comes up and it takes some time to complete. How can I prevent this behavior?
12
votes
3answers
787 views

What does . .bashrc actually do?

When I enter a eg. a new alias into my .bashrc file I can't use it in that terminal window immediately and until recently I thought I had to restart the terminal to reload the .bashrc file. Then I ...
3
votes
1answer
84 views

Paste a URL in terminal using bash script on Ubuntu

I'm on Ubuntu 12.04. I need to write a Bash script which would automatically paste a URL to the terminal without having to press CtrlShiftV on the keyboard. The script contains the command: wget -O ...
1
vote
1answer
66 views

KDE Konsole resize window with bash command

I'm trying to write a bash-script that resizes my KDE-Konsole terminal-window when started. But I can't get it to work. VT-Terminal-codes don't seem to work properly. $ echo -e "\e[8;2;20t" shrinks ...
2
votes
0answers
81 views

Coloured commands in terminal prompt

I've customized the prompt in my Mac terminal like this: export PS1="\[\e[31,1m\] \w $ \[\e[0m\] " This way I get the /working/directory $ in bold red, but I also want to get the command I execute ...
0
votes
1answer
58 views

bash directory name with a space in CDPATH

I'm trying to set a shortcut so that I don't have to type a really long directory name so often. In ~/.bash_profile, I am doing something similar to: export ...
0
votes
1answer
68 views

Two process ids for one terminal in bash linux mint

I am running one bash terminal in linux mint. I wanted to see the process ids of running terminal. So I tried two things: ps -C 'bash' ls -l /proc/*/exe | grep bash Both of this giving two ...
0
votes
1answer
42 views

OS X: invalid option -o

When I open terminal I got the following message invalid option: -o. I cannot use /bin/bash --login because I got the same result. I think that terminal try to execute bash login which can't be ...
1
vote
2answers
53 views

bash terminal that remembers its state when restored from a crash

In Ubuntu, I use the default gnome-terminal to run my commands. I typically have a couple of windows open, each with several tabs. When my OS crashes∗, for whatever reason, and I reboot, I ...
1
vote
2answers
48 views

Message appears every time terminal is opened

On OS X Mavericks, whenever I open up iTerm (or the default Terminal), the following message appears: -bash: /etc/profile.d/sm.sh: No such file or directory -bash: /etc/profile.d/rvm.sh: No such file ...
5
votes
3answers
1k views

Could not create directory '/var/empty/.ssh'

Every day, after several hours of use, anything using SSH will just randomly stop working. The only solution is for me to restart my machine, which fixes it until it randomly occurs again. > git ...
1
vote
1answer
52 views

Restore session/state in terminals

When I close my browser it remembers "state" in the sense that it remembers what tabs I have open and text that I had entered into various forms. Is there a way to do something similar with my ...
1
vote
1answer
40 views

Launch and pass scripted commands to a Terminal script

I've got a.command, a script that waits for user entry (like typing something and then hitting return) It loops forever-ish. For example, it tells the user if their entry is a leap year, or its a ...
0
votes
3answers
102 views

Text expansion tools for linux?

I am looking for a tool that can auto-close brackets and quotes in a terminal. For example, when I type echo " It should automatically expand into echo "" and put the cursor in the middle. This ...
1
vote
0answers
85 views

Can I reverse the stream direction of my terminal?

I'm not sure on how to word this question any other way but that's it. Is it possible to reverse the way your terminal prints text? For example if I type a command, I type it from the bottom of the ...
0
votes
1answer
36 views

Tell me, when script has finished

Some years ago I had a small script[1] called beep-forever which ringed the terminal bell for ever. Use case: I want to know if a script has finished: do-foo-which-lasts-ten-to-thirty-minutes.sh; ...
0
votes
1answer
73 views

Running qtfaststart in a folder containing multiple .mp4's

I have a library of videos, all of which need to be adjusted for web-streaming by putting the moov atom ahead of the rest of the video with qtfaststart. This allows playback to begin before the client ...
0
votes
0answers
65 views

Terminal: Multi-column/Table 'ls'

When running a fullscreen terminal, ls doesn't adapt to the current terminal width and supply me with multiple column-listings of items, it always provide a single column of directory items. Even ...
1
vote
2answers
172 views

Mac Terminal showing bash instead of my username

This makes it hard to know what directory I am in. I installed a version of python for school and now it says -bash-3.2$ instead of MyMacbook: ~$. I'm sure this is really simple, but I know nothing ...