terminal

Copy nested folders contents to one folder recursively (terminal)

I have a Wordpress upload folder that is structured using subfolders for months. wolfr2:uploads wolfr$ tree . . |-- 2007 | |-- 08 | | |-- beautifulkatamari.jpg | | |-- beautifulkatamari.thumbnail.jpg | | |-- beetle.jpg | | |-- beetle.thumbnail.jpg How do I use terminal to copy all the images recursively into another ...

Mysql Color Scheme

Is there a way to set a color scheme for the mysql client? It might sound trivial, but I'd like to be able to set some level of colors for terminal client. ...

Use PuTTY as a local terminal emulator?

Currently, I use PuTTY for SSHing into my linux server and Cygwin for local development when working on my Windows machine. Sadly, the terminal emulator that comes with Cygwin doesn't approach the quality of the excellent terminal emulator that comes with PuTTY. And it occurs to me that there really shouldn't be any conceptual difference...

What's a good browser-based terminal emulator?

We have several curses style applications which we'd like to provide access to through a browser-based interface. We have an application from another vendor which ostensibly provides this based on an old version of the JTA (Java Telnet App) but that applet doesn't handle things like resizing well, and has relatively poor support for sc...

Sample a process on Mac OS X from a C/C++ program

The Sample Process feature in Activity Monitor is quite a useful thing. However, I need to do the same thing (take samples) of a certain process from another running process (C/C++) or a command line. Is there any way to do this? I have been googling for this since a few days without any luck. ...

Do a complete flux of work on bash script

Hey there ! I'm trying to automate a proces which I have to do over and over again in which I have to parse the output from a shell function, look for 5 different things, and then put them on a file I know I can match patterns with grep however I don't know how to store the result on a variable so I can use it after :( I also have to p...

Coloured diff to HTML

I enjoy using git diff --color-words to clearly see the words that have changed in a file. However I want to share that diff with someone without git or a colour terminal for that matter. So does anyone know of a tool or trick that can convert colour escaped terminal output into HTML? ...

Terminal resizing that preserves output

In linux, when a terminal (like xterm) gets resized to something smaller, then expanded again, its output history gets truncated to whatever the smaller width was. Does anybody know how to make the terminal remember its previous state, or wrap text so that this doesn't break? For example, if your terminal reads something like (using | ...

linux virtual application: is this is possible?

I need some guidance from all the Linux experts out there. I would like to do the following. Please tell me if this possible. If it's not, please tell me why. I would like the user to interact with a touchscreen LCD connected to a Linux thin client PC. I want to use Linux Terminal Server to run a virtual linux application (with user int...

Passing parameters while posting status to Twitter using Terminal with CURL

How to pass additional parameters to this twitter update api by using curl from terminal? http://twitter.com/statuses/update.xml Say I need to pass replyto user id as given in the documentation. Although I could simply append @username before the message, I need user id based and @user_id didn't work. ...

cannot write to pty - linux

i am the owner of the pty device created like this permissions are crw-w---- mknod pty1 c 1 1 cat > pty1 tells me operation not permitted. what i want to do later is that i open the file from a program using open and call write to send output to the terminal, as if it is a disk file. why is cat not working. can we write to a pty or ...

How to check if exe is running on terminal session from the server

I'm creating a update program that will copy over updated .exe files. It needs to check if any of the .exes are running in a terminal session. If the .exes are running it will kill them. This will be a service that is running on the server with admin rights. The code needs to be in Delphi any one have any thoughts on this? ...

How to get the width of terminal window in Ruby

Have you ever noticed that if you run rake -T in rails the list of rake descriptions are truncated by the width of the terminal window. So there should be a way to get it in Ruby and Use it. I'm printing some Ascii-art on the screen and I don't want it to be broken. therefore I need to find out the width of terminal at run time some ho...

linux terminal animation - best way to delay printing of 'frame' (in C)

I'm working on a simple pong clone for the terminal and need a way to delay the printing of a 'frame'. I have a two dimensional array screen[ROWS][COLUMNS] and a function that prints the screen void printScreen() { int i = 0; int j; while(i < ROWS) { j = 0; while(j < COLUMNS) { printf("%c", ...

Lite version of PHP?

Hey all, I was just wondering if anyone knows if there is a smaller version of php. I don't need any full-blown apache support I just need to be able to execute "php" to run a script in the terminal. I already have PHP installed on the server, but I do not have access to running "php" in the terminal. I'd just like to run my script tha...

How can I determine if a python script is executed from crontab?

I would like to know how can I determine if a python script is executed from crontab? I don't want a solution that will require adding a parameter because I want to be able to detect this even from an imported module (not the main script). ...

Fullpath in OS X

I am a few steps before starting my first real programming project and I am preparing my machine. I noticed that my fullpath (what I get when I "echo $PATH" in the terminal) does not look like a "normal" one (as I see "usr/bin" quite a lot of times). What does it mean? How does it affect my use of the terminal? And how, if, can I change ...

What do I need to build a file downloader in Perl?

I am working on a file downloader in Perl (UNIX/Mac OS X on terminal). I am actually searching for libraries that would work with handling checksum verification, progress bars and actually such things that the CPAN library itself uses. Which libraries and places to look can you recommend? Are there maybe some finished things like that ar...

Raster graphics in xterm?

No, not ASCII graphics, see the screenshot here: http://en.wikipedia.org/wiki/W3m How is that even possible? I checked the source and it only prints character sequences. However, I am unable to find any reference to graphic drawing or image embedding escape sequences in xterm documentation or elsewhere. w3m also seems to be the only ...

How to send SMS from Mac terminal via GSM modem?

I have Mio A701 communicator that I would like to use as GSM modem for sending SMS from my Mac. What I've found so far is that one just can send an AT commands directly from terminal to special ports like /dev/ttyUSB0 if modem is connected via USB port or /dev/rfcomm0 if connection is handled via bluetooth. My problem is that when I try...