tagged [terminal]

Color text in terminal applications in UNIX

Color text in terminal applications in UNIX I started to write a terminal text editor, something like the first text editors for UNIX, such as vi. My only goal is to have a good time, but I want to be...

26 Apr at 15:25

How to run Ruby code from terminal?

How to run Ruby code from terminal? I need to run a few lines of Ruby code from terminal, but I can't find the needed parameter for it. Can you explain how to do this?

30 Mar at 22:30

How do I clear/delete the current line in terminal?

How do I clear/delete the current line in terminal? If I'm using terminal and typing in a line of text for a command, is there a hotkey or any way to clear/delete that line? For example, if my current...

21 Mar at 04:28

How to edit a text file in my terminal

How to edit a text file in my terminal I'm using Linux mint and using the vi command to create text files, now that I created a text file and saved it. How do I get back into to edit the text file aga...

29 Feb at 08:46

How to open the command prompt and insert commands using Java?

How to open the command prompt and insert commands using Java? Is it possible to open the command prompt (and I guess any other terminal for other systems), and execute commands in the newly opened wi...

3 Feb at 02:54

How to view unallocated free space on a hard disk through terminal

How to view unallocated free space on a hard disk through terminal I want to view the unallocated free space on my hard disk through terminal. I've burned my brains searching the internet for a possib...

6 Jan at 22:23

How to run a specific Android app using Terminal?

How to run a specific Android app using Terminal? I installed Eclipse and Android SDK already. Everything is running fine. I want to install an .apk file so I follow the instruction already. But the p...

Git says "Warning: Permanently added to the list of known hosts"

Git says "Warning: Permanently added to the list of known hosts" Every time I use git to interact with a remote, such as when pulling or pushing, I am shown the following message: > Warning: Permanent...

9 Sep at 15:15

Fastest way(s) to move the cursor on a terminal command line?

Fastest way(s) to move the cursor on a terminal command line? What is the best way to move around on a given very long command line in the terminal? Say I used the arrow key or - to get this long comm...

26 Aug at 09:40

Open new Terminal Tab from command line (Mac OS X)

Open new Terminal Tab from command line (Mac OS X) Is it possible to open a new tab in Mac OS X's terminal from the command line in a currently opened tab? I know that the keyboard shortcut to open a ...

1 Jun at 22:16

SVN Commit specific files

SVN Commit specific files Is there any way to commit only a list of specific files (e.q. just one of the list of files that SVN wants to commit). I'm working on MAC OS X under Terminal, without any UI...

26 May at 13:19

How do I invoke a text editor from the terminal?

How do I invoke a text editor from the terminal? In the Windows command prompt, I can type `notepad helloworld.cpp` which will then create a file with the name and open up Notepad for me. Is there a s...

9 Apr at 09:58

Add pygame module in PyCharm IDE

Add pygame module in PyCharm IDE I've downloaded `pygame-1.9.1release.tar.gz` from the Pygame website. I extracted and installed it and it's working fine in the command line Python interpreter in Term...

Change all files and folders permissions of a directory to 644/755

Change all files and folders permissions of a directory to 644/755 How would I change all files to 644 and all folders to 755 using `chmod` from the `linux` command prompt? (Terminal)

2 Feb at 19:5

Setting the correct encoding when piping stdout in Python

Setting the correct encoding when piping stdout in Python When piping the output of a Python program, the Python interpreter gets confused about encoding and sets it to None. This means a program like...

How to examine processes in OS X's Terminal?

How to examine processes in OS X's Terminal? I’d like to view information for processes running in OS X. Running `ps` in the terminal just lists the open Terminal windows. How can I see all processes ...

22 Oct at 10:41

curl: (6) Could not resolve host: google.com; Name or service not known

curl: (6) Could not resolve host: google.com; Name or service not known when I try to load a web page to terminal it gives `curl: (6) Could not resolve host` error. I have internet in my PC and trying...

26 Jul at 11:11

C# execute a terminal command in linux

C# execute a terminal command in linux I want my c# application (which I execute on a raspberry pi) to run a bash script whenever it starts.. basically : the script is located in `/etc/init.d` and is ...

15 May at 13:27

How to execute a Ruby script in Terminal?

How to execute a Ruby script in Terminal? I've set everything up that I need on my Mac (Ruby, Rails, Homebrew, Git, etc), and I've even written a small program. Now, how do I execute it in Terminal? I...

2 May at 23:55

Failed to build gem native extension (installing Compass)

Failed to build gem native extension (installing Compass) When I attempt to install the latest version of compass ([https://rubygems.org/gems/compass/versions/1.0.0.alpha.17](https://rubygems.org/gems...

20 Mar at 20:59

How do I update zsh to the latest version?

How do I update zsh to the latest version? I recently switched to zsh on my Terminal.app on my OS X machine successfully. The version number of zsh is 4.3.11.

1 Feb at 19:3

Remove blank lines with grep

Remove blank lines with grep I tried `grep -v '^$'` in Linux and that didn't work. This file came from a Windows file system.

4 Oct at 09:7

Kill python interpeter in linux from the terminal

Kill python interpeter in linux from the terminal I want to kill python interpeter - The intention is that all the python files that are running in this moment will stop (without any informantion abou...

25 Aug at 12:1

How to terminate process from Python using pid?

How to terminate process from Python using pid? I'm trying to write some short script in python which would start another python code in subprocess if is not already started else terminate terminal & ...

25 Jul at 11:37

Failed to add the host to the list of know hosts

Failed to add the host to the list of know hosts Mac OSX Lion 10.7. In an effort to get around weird environment stuff (homebrew wasn't installing wget, and I had all sorts of weird blocks and errors)...

How to edit/save a file through Ubuntu Terminal

How to edit/save a file through Ubuntu Terminal This is quite a simple question: I just need to open a file (this filename is galfit.feedme). I can view the file with view galfit.feedme when I'm in th...

8 Jul at 20:28

How can I display the current branch and folder path in terminal?

How can I display the current branch and folder path in terminal? I've been watching some of the Team Treehouse videos and they have a very nice looking terminal when working with Git. For example the...

27 Jun at 02:20

How do you run JavaScript script through the Terminal?

How do you run JavaScript script through the Terminal? For instance, if you were to run a Python script you would type or if you wanted to run a C program then . How do you do this with files?

26 May at 13:11

How to remove entry from $PATH on mac

How to remove entry from $PATH on mac I was trying to install Sencha Touch SDK tools 2.0.0 but could not run it properly. It created an entry in the $PATH variable. Later I deleted the sencha sdk tool...

8 Apr at 06:54

How can I list (ls) the 5 last modified files in a directory?

How can I list (ls) the 5 last modified files in a directory? I know `ls -t` will list all files by modified time. But how can I limit these results to only the last files?

28 Mar at 20:17

using scp in terminal

using scp in terminal I have created a file on a remote computer that I have ssh-ed into. I want to transfer the file back to the laptop I am using at the moment. I see that I am supposed to use the c...

14 Jan at 20:17

How to find the serial port number on Mac OS X?

How to find the serial port number on Mac OS X? I have just started experimenting with Serproxy and Arduino to get some serial data into Flash Builder/Flex. Serproxy seems to work fine and seems to co...

5 Oct at 19:58

count number of lines in terminal output

count number of lines in terminal output couldn't find this on SO. I ran the following command in the terminal: and this displays the list of files where the keyword curl occurs. I want to count the n...

17 Sep at 10:31

SSH SCP Local file to Remote in Terminal Mac Os X

SSH SCP Local file to Remote in Terminal Mac Os X I am attempting to copy a local file 'magento.tar.gz' from my local machine to a remote server using SSH through a VPN. This is connecting to the Virt...

6 Aug at 03:23

How to make the tab character 4 spaces instead of 8 spaces in nano?

How to make the tab character 4 spaces instead of 8 spaces in nano? When I press TAB in `nano` editor, the cursor will jump with 8 spaces like this: how can I set the tab stop width to 4 spaces to dis...

25 Jun at 05:52

Terminal Commands: For loop with echo

Terminal Commands: For loop with echo I've never used commands in terminal like this before but I know its possible. How would I for instance write: ``` for (int i = 0; i

23 Aug at 18:25

Use of parallel / serial port redirection to transfer data from Terminal desktop to local computer

Use of parallel / serial port redirection to transfer data from Terminal desktop to local computer Amongst features of terminal desktop services running RDP port, there is port redirection of parallel...

Show colored compilation errors in C++ on Terminal

Show colored compilation errors in C++ on Terminal Is there any way to show compilation errors in colors on the terminal? I mean when we do "g++ filename.cpp", is there a way to show the compiler mess...

22 Nov at 19:35

How to use terminal services programmatically

How to use terminal services programmatically I want to access remote server using my program (C# .NET) and execute there a program in the context of connected user, just like using Remote Desktop. I ...

How to run a script as root on Mac OS X?

How to run a script as root on Mac OS X? What should I type on the Mac OS X terminal to run a script as root?

16 Sep at 17:30