Tagged Questions
0
votes
1answer
20 views
Attach screen on a running terminal
I have a long running process in a (virtual) terminal that unfortunately was not started in a (gnu) screen session.
Is there a way to migrate it in a screen session? (obviously, without stopping it)
...
0
votes
1answer
35 views
Prevent users from being able to pipe output to another users terminal?
So currently on this server if two people are logged into the same server, you can do something like:
-bash-4.1$ cat /dev/urandom | write username
It will print a bunch of junk to their terminal. I ...
2
votes
2answers
27 views
Place contents of last command line output into clipboard
I want to be able to run a command in my Terminal, and then quickly be able to copy the contents of the output into my clipboard without leaving my keyboard. Is there any way to do this?
1
vote
2answers
19 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 ...
1
vote
1answer
42 views
'nice' does not work, even when using 'sudo'. “Permission Denied”
I am attempting to set the priority on an application to be higher, but I keep getting 'permission denied' when attempting to do som even as the superuser.
From the Terminal:
Alexandsteins-Macbook:~ ...
0
votes
1answer
43 views
Emacs and Unix Screen
I'm in Screen and have one window set to emacs. When I leave that window and maneuver to a different one, say screen two or three, the text in the original emacs window gets discombobulated. The line ...
0
votes
2answers
85 views
Pass arguments to Unix executable in Mac terminal
I'm pretty new to Unix coding and would like to work on a few simple networking projects. I found a few tutorials that are exactly what I am looking for - this one in particular: ...
0
votes
1answer
24 views
echoing the absolute path of new directory on doing cd
Whenever I do a "cd" at the Konsole, I get a warning msg
(echo: Command not found.
I think this happens because Konsole tries to output the path to the new directory, but instead of doing echo ...
1
vote
1answer
63 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 ...
1
vote
2answers
49 views
How to restore Unix terminal
Some times my Unix terminal gets destroyed, either by:
I can type commands, but characters are not echoed on the screen. When I press enter, the prompt is printed on the same line as the current one ...
0
votes
1answer
35 views
Unable to launch app from /usr/bin
OK, this question may sound too basic, but this doesn't mean I'm not still a bit confused :
I'm running OS X 10.6.8 (shouldn't make much difference though, the issue is more like *nix-specific)
I ...
-1
votes
1answer
215 views
How to check if internet connection is available via Terminal
I'm trying to write a Bash script that is aware of internet connectivity.
How can I achieve that?
For example:
if (something that checks internet connection);then
curl -o new someurl
else
exit 1
0
votes
0answers
36 views
Merge command history between the Python shell and the Unix terminal
A convenient feature of most Unix terminals is the fact that you can hit the up and down arrow keys to scroll through your command history to repeat old commands.
This feature also exists in the ...
3
votes
1answer
42 views
What happens to the console input while a process is running?
If for example I run a command from the terminal like this:
$ find . | xargs grep something
The terminal then goes in a sort of pending state and I can type in characters and whatnot as I wait for ...
1
vote
1answer
60 views
How do I create a new file with text outputted from a command?
I just wanna create a file with the outputted text from a command, rather then copying and pasting & making a new file by hand.
I'm on a unix machine.
2
votes
2answers
102 views
grep from one but not the other
How do I grep OUT the content of a file from another file
Say I have a file "file1" and it has
a
b
c
and another file "file2" that has
a
b
c
d
e
f
I would usually do
cat file2 | grep -v a | ...
0
votes
2answers
69 views
File doesn't exist in Linux although it's located in Terminal
I'm a bit new to unix/linux environment, but I have a small problem.
I'm using "locate" to find the path of a file I need, it gives me the path for it, but the file doesn't exist in that path, like ...
0
votes
2answers
27 views
Regarding Backup While Using CP
I have some files on the Desktop
/Desktop/F1/T1
/Desktop/F2/T2
I want to copy those files to another folder like Destination
but If the destination contains a file with same name I want to backup ...
0
votes
2answers
15 views
Change to xth directory terminal
Is there a way in a unix shell (specifically Ubuntu) to change directory into the xth directory that was printed from the ls command?
I know you can sort a directory in multiple ways, but using the ...
0
votes
1answer
338 views
Add color palette for Sakura terminal
How can add my own color palette in Sakura terminal?
I use Ubuntu 12.04, and in options menu, I see only tango, Linux, xterm and rxvt palettes available.
4
votes
3answers
2k views
Can files deleted with rm -rf be recovered?
When I delete folders or files in through osx terminal using the rm -rf, where do they go? I heard that some say they are deleted directly, but some also say it only "remove the link to the file ...
6
votes
5answers
312 views
How to mass prepend text to file names?
Lets say I have a directory full of .md files all named various things. Lets say I wanted to prepend "text" to the front of each file name. So for example: file a.md, b.md, and c.md would become test ...
0
votes
1answer
118 views
Unable to run commands with “sudo” from my user
For some reason, I am unable to run any commands with su as my user. This was working before and I'm not sure what broke it. The funny thing is that I can su to root without any problems.
Example:
...
2
votes
1answer
72 views
Using SSH, transfer webURL to remote machine
Hi so i was doing some research in the library so i could use some pictures later on my Desktop computer in my room. I have space on my Lab account which i usually SSH into, and i was wondering if ...
2
votes
3answers
66 views
Show all subdirectory in a folder and short the result by size
I'm using mac and I use sudo du -h to show all sub directories in a parent directory with their size. Is there anyway i can use to sort the result by size?
I tried using sudo du -h | sort but the ...
0
votes
0answers
41 views
gnu screen - mouse does not work in nested screen session
I started a screen session inside another screen session, both on my local machine. This is using cygwin, but I don't think it matters. I have tried via ssh to a real unix machine but the behaviour is ...
2
votes
1answer
188 views
Ctrl-Z on an SSH session
When I ssh into another system and press Ctrl-Z, I expected the ssh client to go into background. However, it's the remote process that does that. Where does the magic happen?
2
votes
3answers
158 views
Can I remove the ctrl-z key binding in my shell?
The background for this question: I currently have to do a lot of my work in terminal over ssh, and I use screen quite a bit. Because I found the ctrl-a key binding for screen commands so annoying ...
2
votes
2answers
187 views
concatenate files including path in header - path contains spaces
I have to concatenate a number of files in a directory structure which contains spaces in the folder names looking like this: ./CH 0000100014/A10/11XT/11xt#001.csv
find . -name "*.csv" -type f ...
1
vote
1answer
111 views
Using both source and & in a bash script
I was just reading up on how UNIX/ the bash shell work, when I tried something that didn't make sense to me.
The 'source' command, as I understand it, runs the program you give it in the current ...
0
votes
1answer
107 views
How do I send SIGKILL on cygwin in GNU Screen?
I have recently started using GNU screen on cygwin, but the functionality to terminate a foreground process with CTRL-C does not seem to work when there is an active screen session. Is there a ...
0
votes
1answer
531 views
Linux terminal: copy on select, paste on right click
On my work pc I have putty and cygwin setup to copy when I select text, and paste on right click.
Have been trying to get that same combination working in ubuntu. Trying various terminal ...
0
votes
3answers
294 views
For unix screen terminal how to increase log?
The output of my program being too long, on running it in screen terminal some part of output gets truncated.
To avoid this how can I increase log limit of screen terminal?
Any ideas??
2
votes
5answers
2k views
How to find over 1GB folders and execute another command in linux terminal?
I want to find the folders which sizes are over 1GB and then if they are over then i want to erase them.
I found some commands like
find /some/path -type d -size +1G -exec ls {} \;
or
du -h ...
-1
votes
2answers
69 views
How do I install this command-line software?
Here's a link to the software - it's command line and I have no idea how to install so I can use it in Terminal on my Mac.
http://git.zx2c4.com/password-store/about/
Thank you.
3
votes
2answers
518 views
What are the limits of whois command on unix?
All whois services i've used on the web have some limit on number of queries per day or per hour. However, the limit of whois command on unix doesn't seem to be specify anywhere.
0
votes
2answers
476 views
Why is the name of my computer wrong in terminal?
I just transfered all of my files and settings over to a new laptop using Migration Assistant (on a mac). The name of my computer in terminal is wrong for some reason. It's unknown20c9d042dc93
The ...
0
votes
0answers
151 views
Terminal emulation has stopped working. Garbage escape chars
To enable me to do some remote administration of our servers I started using a terminal emulation program called TouchTerm Pro on my iPhone. While not the smoothest experience, it has allowed me to ...
0
votes
2answers
805 views
Can't access Terminal anymore, only shows a cursor
I run OS X.
Following these directions (Installing MySQL on Mac OS X) I added a file to /usr and the contents were
PATH=/usr/local/mysql/bin:$PATH
Actually I was trying to get the mysql command ...
0
votes
1answer
105 views
Precedent for terminal key bindings for Windows or Mac Cmd key
Unix terminals send ASCII codes below 32 for Ctrl + another key, and have at least two ways of sending "meta" (viz. either prefixing code 27 or setting the high bit of an ASCII character). Is there a ...
0
votes
0answers
81 views
Terminal highlighting and auto complete
Do you know some plugin for highlighting and autocomplete in postgreSQL terminal?
0
votes
1answer
291 views
create alias to ssh to a server and then connect to mysql
I currently have an alias to connect to a remote server:
alias server='ssh user@ec2-00-00-00-000.compute-1.amazonaws.com'
I would like to have an alias to connect to this server, and then ...
4
votes
2answers
726 views
How to configure the ANSI colors of the command line terminal
I specifically use bash on Mac OS X, but I think the answer would be Unix-generic.
I'm already using ANSI colors, but I'd like to reassign different colors to folders, hidden files, etc.
...
2
votes
3answers
50 views
Terminal: login(1) or su(1)?
I am on OSX. Can use both login(1) or su(1) to login as any user.
But, two binaries to make the same job??
Which one consumes less system resources?
Which one is less prone to security risks?
...
0
votes
1answer
283 views
Changing gnome-terminal color theme depending on running app
I would like to know, if it is possible to change color theme (or whole gnome-terminal profile) if for example midnight commander is started inside gnome-terminal. my wish is to not to launch new ...
0
votes
1answer
259 views
Colors in zshell prompt cause odd behavior
I'm running OSX Lion 10.7.3, zsh version 4.3.11. I've found that if I have color escape codes in my prompt, it royally screws things up. For instance, if I scroll forward through the command history ...
0
votes
1answer
87 views
Passing in dialog answers for command-line application on launch
I'm using pianobar for listening to Pandora from my terminal. On each launch it asks for an email & password. I'd like to pass this information automatically when I launch pianobar, so I don't ...
3
votes
2answers
83 views
What's an example of a utility program that the env command could call?
After taking a look at the env command man page I was curious to see an example of a utility program that would be used in the usage noted below?
SYNOPSIS
env [-i] [name=value ...] [utility ...
2
votes
1answer
120 views
What is a socket link?
After noticing an interesting environment variable Apple_PubSub_Socket_Render. I notice that it was referring directly to this "Render" file.
After doing a listing of "Render":
ls -lh Render
I ...
1
vote
1answer
118 views
Why does my terminal have funny characters for the date field? Looks like Russian?
Strangely my terminal has funny characters in the date area that look like Russian. Does anyone know why it displays these characters?
(I'm running Mac OS X Lion)

