0
votes
0answers
13 views

How does one install this mcrypt package?

I'm using MAC os x Mavericks, so after dlownload mcrypt-2.6.8, I decided to to configure ( per the recommendation of a dozen blogs ) like so : MACOSX_DEPLOYMENT_TARGET=10.9 CFLAGS='-O3 -fno-common ...
0
votes
0answers
20 views

How to find the currently running app from terminal on OS X?

I'm writing a shell script runs in the background and monitors user activity. I'd like to be able to capture current application/document if possible. How can I do that?
0
votes
1answer
18 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
1answer
27 views

What variables I can place in a Putty Link?

I create a new link in Windows with the following target: "C:\Program Files (x86)\PuTTY\putty.exe" -ssh username -pw password Are there any other options I can add in that one link target? I am ...
0
votes
1answer
29 views

Start tmux session with only one window but several panes

I'm trying to configure tmux so it starts creating a new session with three panes. One big pane on the left und two small panes on the right side. I set set -g default-terminal "screen-256color" ...
1
vote
1answer
32 views

What does man [-acdfFhkKtwW] mean?

I am fairly new to using the OSX terminal, so before I move forward, I want to get good at finding information out for myself. So, I was reading about the manpages about manpages, and I saw that I ...
0
votes
1answer
29 views

Remove all traces of emacs and start over

I've been trying to install PolyML in Emacs on my Mac in OSX but I can't get that or SML-mode to work. I've tried the builtin emacs, the gui version and the one from homebrew. Neither poly or sml ...
0
votes
1answer
36 views

Extract single file from tar without taking its directories with it

I'm currently using this command tar -zxvf foo.tgz -C /root/dir1/ dir2/dir3/dir4/dir5/file to extract my specific file from a tar archive to a given directory, dir1. As is, I end up with ...
0
votes
1answer
78 views

Get Rid of Error Message

I have a script with many commands. Like #!/bin/sh mv new /root/ mv old /root/ mv foo /code #many other commands If the file 'new' is not found bash will give an error message:foo: No such file ...
0
votes
2answers
115 views

Check If a script is executed as root?

I have a script that requires root privileges. I have to execute it either via sudo or from an account with uid 0 (e.g. root). If the script is not executed with sufficient rights then I want that ...
1
vote
2answers
135 views

Ignore case from user input

I'm trying to write a script to catch user input. The script should ignore the case. Consider this script foo.sh: if [ $1 == "string" ]; then echo true else echo false fi If the input of ...
0
votes
1answer
228 views

ash: command not found

On my NAS I have installed Unison package, which works when ssh'd into the NAS with this $NAS unison -version. However when running the command locally without ssh'ing to the system first using ssh ...
0
votes
2answers
43 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 ...
0
votes
4answers
89 views

Efficient system exploration/navigation on Linux?

I've been using unix and the command line for some time already, but my main method for navigating through files and directories is still cd path; ls; cd path; ls.... This is not effective at all. ...
1
vote
1answer
37 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.
0
votes
1answer
104 views

kill command working despite error

after running this command kill -9 <PID> for ./sc_serv. I am getting this output below: -bash: kill: for: arguments must be process or job IDs -bash: kill: ./sc_serv: arguments must be process ...
1
vote
3answers
766 views

How to reset a broken TTY?

My Slackware TTY can be broken easily by running: cat some_binary_file After the command, the entire TTY will no longer display readable characters but still responds to keyboard events. Even if I ...
0
votes
0answers
324 views

.png file won't open in terminal

for some reason this .png image won't open in my terminal. i keep getting these responses: lkthomas@unix12:~/private$ eog snippet.png Cannot open display: Run 'eog --help' to see a full list of ...
1
vote
2answers
85 views

Using a Unix terminal to encrypt a disk under OS X

I'm interested in knowing whether there are any native utilities (possibly under diskutil) to encrypt a disk via the command line in OS X 10.8.4. I can use FileVault or Mac OS's Disk Utility Erase ...
0
votes
2answers
407 views

Uninstalling Homebrew messed up git

I uninstalled Homebrew using http://superuser.com/a/203740. After running the above commands, I can't find .bashrc and .bash_profle. All files are gone from Documents , Desktop and Downloads :'( ...
0
votes
0answers
21 views

Uninstalling Homebrew messed up git [duplicate]

I uninstalled Homebrew using http://superuser.com/a/203740. After running the above commands, I can't find .bashrc and .bash_profle. When I do git status on /Users/ava it shows: # On branch master ...
1
vote
2answers
54 views

does this exist: UNIX box with ethernet and nothing else, all interaction is done by SSH'ing in

So I could sit this UNIX box by my router and all configuration would be done via local SSH. Then once it's set up, I could SSH in from the internet and use UNIX (and all the tools contained within). ...
0
votes
2answers
82 views

Reroute IP through another country [duplicate]

How can I route my IP through another country? For example, right now I am in France, and I would like an IP to access URL's through a US IP.
1
vote
2answers
178 views

How to open files with forward dash in linux

I need to open a file with filename that contains forward slashes. I am wondering how I can do that. I have been searching through Google and I can't seem to find a way. Thanks
0
votes
1answer
150 views

How do I supress date/time display in GNU Screen vertical splits?

I am using a copy of GNU Screen packaged for Fedora 18. I copied these neat lines over onto my .screenrc, to show me the host/date-time/windows: # Neat status bar on the bottom of the screen caption ...
0
votes
1answer
77 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
95 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 ...
3
votes
2answers
115 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
36 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
252 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
53 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
416 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
32 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
218 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
137 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
59 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
2answers
1k 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
62 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
53 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
74 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
214 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
219 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
38 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
21 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
2answers
860 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.
7
votes
3answers
9k 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 ...
9
votes
5answers
1k 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
270 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
89 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
134 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 ...