3
votes
0answers
84 views

CentOS colors in php-cli applications [closed]

I'm managing a server with CentOS 6.5 x64 installed. In my Ubuntu server, when I run composer or Laravel's artisan php cli command, parameters are colorful. But this doesn't happen when I SSH into ...
1
vote
1answer
45 views

OSX - How can I copy a local users settings/preferences to a new mobile user

We are working on migrating all our local users to mobile accounts that are bound to LDAP. I am working on a script that prompts a user to enter their email and it creates a new mobile user and then ...
-4
votes
1answer
48 views

Killing a bash sh script [closed]

I made an .sh file load.sh which has (almost) unlimited loop of curl requests. I run this as $ bash load.sh. Now it just keeps running the loop. I can't cancel its execution. It keeps running. I ...
2
votes
1answer
219 views

Terminate remote process when backgrounded ssh session is terminated

So right now I have a bash script that runs a command on a remote machine using ssh. The machine running the bash script is a Linux machine and the remote machine is a Windows machine running cygwin. ...
1
vote
2answers
127 views

Strange characters from output in shell

Over the past few years there have been some Linux systems that will output strange characters when running various commands. Here's an example of my output from the sensors command on one of those ...
1
vote
1answer
63 views

bash_history file and history command showing different entries

I am using the Terminal app on OS X to try and clear my command history. The entries within my $HOME/.bash_history file do not match what is returned by the history command. The echo $0 command tells ...
0
votes
1answer
500 views

Curl authentication

I am trying to download a file with cURL from a password protected directory on my site. It is not working. Instead of the downloading the requested file, it downloads a HTML file that says, ...
17
votes
14answers
1k views

Reasons for missing IP info in `last` output on pts logins?

I have five CentOS 6 linux systems at work, and encountered a rather strange issue that only seems to happen with my userid across all the linux systems I have... This is an example of the problem ...
1
vote
1answer
329 views

Can I recover a nano process from a previous terminal?

My system crashed while I was in a nano session with unsaved changes. When I log back in via SSH I see the nano process still running when I do a ps. davidparks21@devdb1:/opt/frugg_batch$ ps -ef | ...
1
vote
1answer
85 views

what TERM to use to get rid of color escape codes? [closed]

Is there a way to get rid of escape codes in terminal output? Say even if the script are sending that codes they are ignored by terminal and text displayed as is, without colors, bolds etc. I need ...
2
votes
3answers
2k views

“Cannot set terminal process group” during su to another user as login shell

Note: Please read the updated information starting with "EDIT" near the halfway point of this post - the environment and background of this problem has changed I've got a bog standard Debian 6.0 ...
0
votes
1answer
936 views

How to get Network Data Received and Data Sent Information on Mac OS X?

I want to store the network data received and data sent information on a variable or in a file. Using the below command I can grep it and print the line on screen. But I'm not able to store the info ...
2
votes
2answers
360 views

`less` not able to display special characters

I stumbled upon bad special characters in some manpages: If your terminal is a "true" auto-margin terminal (it doesn▒<80><99>t allow the last position on the screen to be updated ...
0
votes
1answer
834 views

Installed PHP 5.4 via OS X binary, but `php` in terminal still uses 5.3 [closed]

I used a nice one-line command to install PHP 5.4 Mac OS X Lion, from php-osx.liip.ch. This is working perfectly in Apache – my local sites are now using PHP 5.4. But when I run php -v from the ...
1
vote
1answer
154 views

Convert back slash file names into directories

To move some data from a program on Windows to the same program on Mac, the program has a built in backup tool. Unfortunately it seems they never tested cross platform compatibility as the ZIP file ...
2
votes
3answers
575 views

Server Bash Line Wrapping Over Text & In Wrong Place

This is quite a hard problem to explain, when connecting to one of my servers using the bash shell, under any user the line wrapping is broken and has all sorts of problems. Once of which I detail in ...
1
vote
3answers
6k views

-bash: apt-get: command not found

Over the course of uninstalling the HP/palm enyo SDK and installing node JS I somehow goofed up something (I think my path). Now when I try use apt-get I get the following: -bash: apt-get: command ...
0
votes
2answers
323 views

Days since a specific date

How to print in linux/unix bash the number of days since a specific date till now? (for example days since 23rd of June 2009 till today)!
0
votes
1answer
675 views

Sending a message to a remote terminal

Is there a way to send a message to a remote terminal similar to using the wall command for other users on the local system? In this scenario I want to specify a username@hostname and have a message ...
1
vote
2answers
352 views

what does the command bash do when typed in a linux terminal? [closed]

When I type bash in to linux cli, it gives me bash-3.2$ so what does it do?
1
vote
2answers
184 views

interactively watch other users action on server

im having some server issues and called for support. i would like to be able to view the support persons action on the terminal in real time from a different location. possible?
5
votes
2answers
646 views

Why does CTRL-r act weirdly (showing only part of a command) on OS X

Ctrl-r is a great little tool for searching your .bash_history for previously run commands. However, when I use it in my OS X Terminal.app I see weird behavior, and I was wondering if anyone else ...
4
votes
2answers
5k views

How do I reclaim a disown'd process?

Similar to many previous questions, I found myself running a job that I wish I had run in screen. I was forced to disown the process because I needed to disconnect. Now that I have reconnected, I see ...
0
votes
4answers
322 views

Last command starting with

Using BASH, you can get the last command (when connected through a PuTty terminal) using the UP arrow key. I want to know if there's a way to "autocomplete" the last command I did starting with mail, ...
3
votes
2answers
749 views

Bash Script for SCP — SSH Keys

I'm working as a programmer at the moment, and as a result need to constantly upload my software to remote systems for testing. I have about 7 machines which need to receive copies of everything. At ...
2
votes
1answer
1k views

Start a VPN session using a Terminal script

I use an OSX Terminal session to start a VPN connection. The command that I execute at the prompt is: /etc/netlock/cvc -c :: This works as expected. I would like to save this to a script file that ...
2
votes
5answers
1k views

Shell command to remove files extension

I have a directory with automatically generated files that all end with the .sample extension. I would like to have a way to remove the .sample extension from them all in one terminal command. I ...
2
votes
2answers
4k views

ps ax | grep java with no wrapping in the terminal?

Is there a way to execute ps ax | grep java without it wrapping on the terminal?
4
votes
3answers
326 views

What do you do when a command floods your terminal with too much output?

I'm trying to solve a common annoyance: when SSH'd into remote servers I often do things that produce a lot more output than I'm expecting. For example, grepping a large log file with a pattern that ...
5
votes
4answers
4k views

How can I find the path to an executable in OSX

Is there a command I can use to easily find the path to an executable? I'm looking for identify on my local machine - something like pwd? pwd identify => /usr/local/bin/identify
6
votes
4answers
2k views

How can one set a terminal's title with the 'tput' command?

I discovered through this answer that I've been setting terminal colours in my prompt in a naive way for years. I've now modified my .bashrc to use 'tput' commands to colourise various elements of my ...