0
votes
2answers
59 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
0answers
21 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
12 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
3answers
48 views

How do I properly install and organize terminal software on OS X?

I've been learning vim and messing around with installing certain terminal extensions like zsh and tmux. So far I've been installing everything according to their online instructions, and this has ...
0
votes
2answers
26 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
34 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 ...
3
votes
1answer
70 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 ...
1
vote
2answers
32 views

Is there a terminal supporting embeded graph under linux? [closed]

everyone. I want to know if there is a graphic terminal which support viewing images inline. The ipython qtconsole is very cool because it has the '%matplotlib inline' magic. But I'd like to use ...
1
vote
0answers
43 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
38 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
2answers
109 views

How to exit a batch script when a command is not found

I want the terminal to close itself if adb is not recognized. ADB is a program this script will utilize to detect device. Here is a bit of my script echo My name is RomBreaker echo. echo And I'm ...
0
votes
2answers
72 views

What are the differences between each virtual console (Ctrl+Alt F1 - F6)?

In Ubuntu, there are 6 virtual consoles, which can be accessed by pressing Ctrl +Alt + F1 - F6, and F7, to exit. What are the differences between these virtual consoles? Do they run different things, ...
1
vote
1answer
87 views

Infinite loop in Terminal (ksh) to launch commands

I'm trying to create a loop in terminal to launch every second during the execution of an script the following command. I don't want to create the loop in .sh script file, i'm trying to do in the ...
1
vote
2answers
192 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 ...
3
votes
2answers
994 views

Unknown ruby interpreter version

I have a MacBook Pro, running Mavericks, but I'm not too acquainted with its inner workings. I'm just a humble CS student. After installing Ruby 1.9.3 and Rails 4.0.0, I get this annoying message ...
3
votes
3answers
480 views

Why do people source bash_profile from bashrc instead of the other way round?

It sounds like most terminal emulators don't run local sessions as login by default, so they'll load bashrc rather than bash_profile. So why do most people put everything in bash_profile and have ...
0
votes
1answer
30 views

Find and add/replace kMDItemKeywords attribute OS X

I'm trying to find files (images) tagged with a specific tag and add (possibly replace) it with a new one. Right now I come up with: mdfind -0 -onlyin '/Volumes/HDD_MED_201304/Photos' 'sampleTag' | ...
0
votes
1answer
50 views

Terminal scrolling from shell script

Is there any way to perform the effect of using the scroll bar in Terminal.app using a shell command? Maybe something cross-platform, that works in Linux terminal emulators too?
0
votes
2answers
171 views

Shell function in .bashrc is not recognized

I know this must be something silly but somehow I am stuck trying to create a shortcut (alias) for a shell function. Here is my exact .bash_profile: [[ -s "$HOME/.rvm/scripts/rvm" ]] && source ...
1
vote
2answers
73 views

How do I launch a command file (e.g. *.sh) in a separate shell interaction utility (e.g. iTerm2) on my user's login?

iTerm2 is an awesome utility and makes my interaction w/ the command line much easier. There are a lot of update commands I run on a daily basis, and thought it would be amazing if those could be ...
1
vote
2answers
147 views

Is it possible to grab and store the returned window id of a terminal opened through applescript or bash?

I have been working on this "dashboard" to help control my localhost server environment. It has been scripted in bin/bash for reference. I recently discovered I can use the bin command "osascript" to ...
1
vote
1answer
222 views

In a Shell scripts, check version of installed package, make a decision based on output

Looking to write a cross distro / cross version shell script that makes sure a forced version of PHP is installed Example: Ubuntu 12.04 has 5.3, Ubuntu 13.10 has 5.5, Debian 7 has 5.4 I need this ...
0
votes
2answers
55 views

What is the difference between different “make” commands?

So after running configure file on source codes for different applications one enters make and make install to install the application. My question is what is the difference between make and make ...
1
vote
1answer
48 views

Where is virtualenv's deactivate defined?

Virtualenv defines an alias for the command deactivate as seen in yourvirtualenv/bin/activate.csh. What I'm curious about is where deactivate resides, because when I issue an alias command deactivate ...
4
votes
1answer
176 views

How can I delete a just-typed newline character in bash?

I sometimes copy-paste paths into the terminal, and often accidentally copy the newline character. For example, I want to find then read the contents of foobar.txt. $ locate foobar.txt ...
1
vote
1answer
40 views

What's the difference between 'chsh -s' and 'export SHELL'?

I think that the export command is only active per login session, but I'm not sure. chsh I think is more permanent. Can someone clear this up for me (preferably with links/docs)? Thanks.
2
votes
1answer
302 views

Bash, how to globally fix ^H and ^? backspace problems

I'd like to fix this frequent problem where the shell on a remote server thinks my terminal's backspace key is ^? and sometimes it thinks it is ^H, and happens to be incorrect and outputs the wrong ...
0
votes
1answer
247 views

How to find out (debug) why ( /etc/rc.d/rc.local ) not executing a command that works ok via terminal?

There is a command inside my /etc/rc.d/rc.local i am not sure why it is not being executed. i think i either need to add #!bash or something on top of the script or perhaps i need to add ...
1
vote
0answers
53 views

Automatically closing idle windows in Gnome

Can open windows automatically close themselves if they have not been used for X seconds in Gnome? For example, right now I have some Firefox windows and some other file browser windows etc open ...
1
vote
1answer
35 views

Does this spawn multiple processes

I would like to know if this shell script line spawns multiple processes: nohup openocd -f board/stm32f4discovery.cfg >>/dev/null 2>>/dev/null & other operations here Basically, I ...
1
vote
2answers
362 views

Why do random characters appear in terminals in Windows?

I've been programming on Windows for a few years, and there has been an issue that is becoming increasingly frustrating as I have really started to use various terminals in Windows for my development ...
1
vote
2answers
334 views

How to kick other root users logged in from different shells?

I logged into a machine, and entered: insite1@POC-Messaging1:/opt/insiteone/log> last -a | grep "logged" insite1 pts/6 Tue Jul 30 03:59 still logged in 160.110.5.210 root pts/5 ...
0
votes
2answers
128 views

some environment variables not load under certain circumstances

It is most weird. I have set the environment variable TEST in .bashrc, .bash_profile, .profile, /etc/profile and /etc/profile.d/ - everywhere a sane computer might look for it: TEST=successfull ...
1
vote
1answer
222 views

run a shell script on terminal if terminal is idle for few minutes in linux

i can get terminal idle time by w command as follows $ w 14:37:58 up 2 days, 20:16, 2 users, load average: 0.12, 0.16, 0.14 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT ...
0
votes
2answers
63 views

How to change the definition of word separators for the shell?

Is there a way to change the definition of the word separators in bash? This will allow me, for example, to do ctrl+w (delete previous word) at the end of this path: /some/path/of/some/file ...
3
votes
1answer
92 views

Is there any benefit to exiting nested SSH sessions, as opposed to closing the entire terminal application?

The question should hopefully sum things up, but essentially, I'm in a bunch of SSH sessions, some of which have additional SSH sessions to other hosts. Are there any negative impacts to simply ...
4
votes
4answers
9k views

How can I use a bash like shell on windows

I use Linux and a Mac. I'll be teaching some command line stuff soon. What can I install on Windows to give me a terminal window most similar to a basic mac/linux bash shell. Would like to be able to ...
2
votes
3answers
100 views

How do I prevent $PATH from resetting itself each time?

I'm having difficulty setting up the PATH on my macbook pro. I followed this link to modify my path variable. Each time I start a new terminal I get a PATH pointing towards ...
1
vote
0answers
905 views

Close a specific Chrome tab in Ubuntu/Linux using terminal command

Is there a way to close a specific Chrome tab with a terminal command? I tried below commands: kill -9 <pid of Chrome tab>: Instead of closing a tab, it kills the tab ("He's dead Jim" message ...
4
votes
1answer
175 views

How can you reverse the direction of alt-period in Bash?

In Bash, you can press Alt-. to insert the last argument of the previous command. If you press it multiple times, it cycles through the last arguments of all of the commands in your history. However, ...
1
vote
2answers
40 views

^S in terminal does not get sent to Vim

I'd like to overload both Ctrl+S and Cmd+S to save a file if I happen to be editing something in Vim. After some head-scratching I think I've discovered that ^S in a terminal is perhaps being caught ...
4
votes
3answers
1k views

Using wildcards in commands with zsh

Using commands such as rsync and scp with ZSH I've run into trouble. Instead of the (normal) behaviour of giving me all matching files, it won't run and returns: ➜ ~ rsync -azP user@server:~/* ~/ ...
5
votes
4answers
1k views

BASH history truncated to 500 lines on each login

For some reason, I cannot get my system to keep my BASH history after a reboot. Here are the relevant sections of my ~/.bashrc: shopt -s histappend PROMPT_COMMAND='history -a; updateWindowTitle' ...
0
votes
2answers
61 views

how to move cursor to given positon when using shell

I'm using iterm2 under MAC OSX. I can using "Ctrl+a" move cursor to the head and using "Ctrl+e" move cursor to the end Is there any hotkey can move cursor to given position?
1
vote
1answer
247 views

Remove path until slash when typing in terminal

For instance, when I type a path in terminal cd project/example/one I can press Ctrl+W and remove the entire "word" project/example/one. Sometimes it's not very useful. Are there any shortcuts for ...
2
votes
3answers
682 views

Vim + iTerm2 color issues

I have trouble with the right Vim configuration. I'm using the latest version of Vim as well as the latest version of iTerm2. I try to get the solarized colorscheme working, but without luck so far. ...
0
votes
2answers
251 views

How to permanently reset my $PATH?

I was trying to add something to $PATH and it went totally wrong. I now can't run any commands such as ls. I've looked at this answer ...
3
votes
1answer
223 views

Filter interactive output (top)

How can I filter the output from a "self-updating" program such as top while keeping its functionality intact? For example, I want to highlight my user name in top's output. My idea is to use ...
3
votes
2answers
2k views

How to add commands of windows to local shell of XShell 4

XShell is a very powerful tools to ssh remote computers such as Unix/Linux. And it has built some internal commands for you to run within your Windows. Xshell:\> help Internal Commands: new: ...
1
vote
1answer
1k views

Horizontally split-screen with two programs?

I have two programs A and B. I want a single command, which will run Program A and Program B in two different terminals but in the same tab, i.e, in a horizontally split terminal. I know screen can do ...