Tagged Questions

A shell is a command line environment that allows advanced scripting. It is provided on many (all?) operating systems based on or inspired by Unix. Notable OS's are Mac OS X, BSD, Solaris and the different flavours of Linux. Bash is such a shell created in 1987 to fix some of the problems of the ...

learn more… | top users | synonyms

0
votes
1answer
23 views

Why does my Mac address reset after reconnecting?

I have ubuntu 12. I'm changing my mac address with ifconfig wlan0 hw ether xx:xx:xx:xx:xx:xx which works. However when I restart my connection my computer resets my mac to my original mac address. I'm ...
0
votes
1answer
40 views

Is TLS secure enough to prevent eavesdropping carried out by an ISP?

I would like to "secure" my email, http servers and desktop client by connecting exclusively over TLS, be it email, in/out:80 or just regular "web surfing" traffic. Will that prevent ISP and ...
0
votes
1answer
31 views

How to delete directories older than one hour (cron job)

My application creates directories when user performs certain action. These directories are stored on my machine for exactly one hour and than are deleted. Now I would like to move the 'deleting ...
2
votes
1answer
35 views

Change volume from bash

I got this far (from .bashrc): alias i="amixer -c 0 -- sset Master playback +1dB" alias d="amixer -c 0 -- sset Master playback -1dB" alias v4="amixer -c 0 -- sset Master playback 40%" alias ...
2
votes
2answers
25 views

How to override default bash key-bindings?

I write this config file: # ~/.inputrc Control-d: "\C-udate +'%F %T'\C-m" I want to run date command when I type Ctrl-d. But I cannot override the default behavior(exit). Thanks for your help.
1
vote
0answers
19 views

Where shared folders are located on MAC OS X Lion?

On Snow Leopard there is a file named /var/db/samba/smb.shares where listed all shared folders. Does anyone know, where that file is located on MAC OS X Lion? Thanks
0
votes
0answers
15 views

How to goto other end of highlighted text in copy-mode of tmux?

In GNU screen copy mode, I can type o to goto other end of highlighted text. How to do it in tmux?
1
vote
0answers
21 views

mapping cntrl+p , cntrl +n in command prompt

I m looking for a way to map CNTRL+p and CNTRL+n in command prompt to previous and next command in history. I m aware of F3 and up/down key but I m habituated to CNTRL+p/n on linux.
0
votes
2answers
51 views

Search for exe file within a condition

I want to search for all .exe files greater than 200 kB or smaller than 120 kB in the current folder and its subfolders. Then I want to move them to another folder called "folder" and execute in this ...
4
votes
0answers
26 views

BSOD during Cygwin install

I have been running Cygwin (1.7.7) under Windows Vista 64-bit, SP2 for at least a year, and had no problems with my installation at all until today. When I tried to install apt-cyg, I realized that I ...
2
votes
1answer
25 views

bash completion does not work for newly added user

I added a new user in my ubuntu system with sudo useradd -d /home/peeyush -m peeyush sudo passwd peeyush The above list of commands created a new user successfuly but the new user is unable to use ...
0
votes
1answer
29 views

How can I set a git config item as a function?

I'm trying to set up the gist gem, but I don't want to have my GitHub password stored as an environment variable or git config item. The README from the GitHub repo explains, You can also define ...
0
votes
2answers
49 views

bash script to remove select files

I have a series of files that are named according to field.%d.vtk and are generated when I run a C++ code. The codes does a series of computation inside a for-loop and dumps the output whenever i%N == ...
2
votes
1answer
42 views

How to close other windows in tmux?

I write some functions in .bashrc to make tmux easy to use: #!/bin/bash # .bashrc # vim tmux #----- -------------------- tabc() { tmux kill-window; } tabe() { tmux new-window; } tabf() ...
1
vote
2answers
62 views

How can I get the mount path of a USB device on OSX?

I have a backup script that backs up some data to a USB device. The problem I have is that OSX sometimes changes the expected mount path. For example if some file is locked under the expected mount ...
0
votes
0answers
11 views

Debian + Grails console: destroys local echo of ssh session after exit

I installed grails on a virtual vagrant box of Debian Squeeze 64. the debian box base image is available under http://dominique.broeglin.fr/2011/03/26/squeeze-64-vagrant-base-box.html the grails ...
2
votes
1answer
54 views

Send all error messages to a text file?

I'm trying to run the following command: $ psql -d template_postgis -f /usr/local/pgsql-9.1/share/contrib/postgis-2.0/postgis.sql It produces a vast amount of error output, of which I can only ...
1
vote
0answers
27 views

tail -f updates slowly

I'm not sure why, but on my Macbook Pro running lion I get slow updates when I issue "tail -f" on a log file that is being written to. I used to use this command all the time at my last company but ...
2
votes
2answers
37 views

How can I avoid descending certain directories with 'find'?

Currently I have this find command which avoids descending particular directories: find . \! \( -name ".hg" -prune \) \! \( -name "localhost" -prune \) \! \( -name "logs" -prune \) -type f The ...
3
votes
1answer
58 views

How can I do a recursive find and replace from the command line?

Using a shell like bash or zshell, how can I do a recursive 'find and replace'? In other words, I want to replace every occurrence of 'foo' with 'bar' in all files in this directory and its ...
0
votes
0answers
28 views

How does the .profile file work if I fork a process?

Lets say I open vlc or gimp on startup, but those commands don't return until the program closes. Does it just let a bash interpreter run indefinitely until they close or does it run and immediately ...
2
votes
2answers
78 views

What happens under the hood when I run a command line program in another programming language?

Some programming languages have system() exec() calls where I can run commands. What exactly happens when I do that? If I run system("ls") Does it run a bash interpreter on the string? Does it make an ...
3
votes
1answer
41 views

In ubuntu alt+f2 spawns a process that is not attached to a shell. How would I do that in bash?

emacs & Forks but the process is attached to the shell nohup emacs & Something like that works but seems to make some kind of log file Just what exactly is alt+f2 doing?
0
votes
1answer
17 views

git-number not working on Linux: sh: git-id: not found

I've set up the script git-number on my Cygwin computer without any problems. I've put all three required scripts in a folder in my home directory called bin/ and everything works fine. Now I'm trying ...
0
votes
1answer
86 views

Automatically close Terminal after script execution

How do I automatically close the Terminal after script execution? #!/bin/bash cd ~/Desktop/sh-scripts/ ./start.sh & // ??? how to close Terminal
0
votes
1answer
75 views

Give permissions to www-data user to run a local script

I actually try to launch a gnome-terminal with a PHP script, and seems I have some problems with the users www-data; My script only makes an ls -l command in a directory (is just for a test) and I ...
1
vote
0answers
27 views

Unix (Debian) autocomplete paths thru symlinks

By default, directory symlinks on unix systems are treated as files as far as the autocomplete feature goes. For example, having a directory symlink at /srv/link/, typing /srv/liTAB does only complete ...
0
votes
0answers
27 views

Why does this command lock up Linux and make CPU utilization go 100%? [closed]

Possible Duplicate: What does this cryptic Bash command mean? I typed one bash command in my command prompt : ( ) { : | : ; } ; : and my linux got hanged and cpu uses is 100%. I do ...
2
votes
2answers
34 views

How do I use BASH to change “A” Train.flac to 'A' Train in a filename?

I've tried every combination of backslash and asterisk and curly brackets, nothing seems to work. I'm using the terminal in OS X and I would really appreciate it if someone could steer me straight.
0
votes
1answer
35 views

using history command with ssh and getting output with correct time stamps [closed]

Possible Duplicate: using history command with ssh and getting output with time stamps Basically i want to get a record of all commands executed on my ssh server, with their correct ...
0
votes
1answer
26 views

bash script working, but outputting only 1 file

Attempting to have this script run through a directory and perform the operation on every file with the .tmp.tcx extension, so if I had 3 unique files with ${b}.tmp.tcx, I'm hoping for 3 unique files ...
2
votes
2answers
66 views

Getting “export PATH” to stick

I just upgraded to Lion and I am using bash for the first time (my previous experience is with csh and tcsh). I have encountered unexpected behavior. A simple example is: I create a file ...
0
votes
2answers
39 views

How to find out why openning a Terminal in OS X is very slow sometimes?

Is there a way to verbosely print everything that gets executed when I open a Terminal in OS X? Sometimes it takes up to 10 seconds for the Terminal to become ready for interaction and I want to know ...
1
vote
2answers
30 views

Why doesn't chmod work in this case?

I'm trying to set a small webserver for personal use. I have a fodler /srv/http/cgi-bin/ which I want to edit as user and not superuser. I tried to chmod it as mentioned here. Here is the result: ...
1
vote
1answer
19 views

bash 4.2 autocd command default over directory

Just switched from tcsh to bash 4.2 on OSX, and autocd was what allowed me to do it. But it seems that by default if you type the name of a directory that also happens to be the name of an executable ...
0
votes
0answers
30 views

Can't start a service (sudo) remotely from script and keep it running

I have a service (tomcat) that needs sudo to be started. I made a simple script on the remote server in /root/bin/test.sh #!/bin/sh sudo service tomcat start read (The script needs to do other ...
0
votes
1answer
43 views

Terminal not working: -bash: exit: with: numeric argument required what to do?

I was trying to install F# compiler and interactive on my Mac, and part of the installation process required providing aliases in the bash profile file. I suspect that I messed something up here, ...
0
votes
0answers
19 views

Terminal highlighting and auto complete

Do you know some plugin for highlighting and autocomplete in postgreSQL terminal?
1
vote
2answers
91 views

How can I automate a root command after (not during) startup?

I'm using Ubuntu 12.04 LTS, but I need to run the following command: sudo dhclient after startup to acquire a stable ethernet connection. I am running dhclient during startup already, through the ...
2
votes
2answers
41 views

How to get both PIPESTATUS and output in bash script

I'm trying to get last modification date of a file with this command TM_LOCAL=`ls -l --time-style=long-iso ~/.vimrc | awk '{ print $6" "$7 }'` TM_LOCAL has value like "2012-05-16 23:18" after ...
0
votes
1answer
43 views

Remove middle folder?

I have foo/bar/myfiles and I want foo/myfiles. I was trying to git clone a repo into foo, but it made the name of the repo as a folder and put the files in there. I'm thinking of just cloning into ...
3
votes
3answers
74 views

What's the easiest way in *nix to wildcard a substring of a filename?

I want to do something like take the part of a wildcard match and use it similarly to a regex match. The command might look something like this cat foo_* | python magic.py > magic_* If my file ...
1
vote
2answers
78 views

Bash/xdotool: Commands work, but not in a script

I am making a bash script for Linux which closes the terminal window if the window loses focus. On the command line, I was able to do this: termwin=$(xdotool getactivewindow) while : do if [[ ...
3
votes
2answers
63 views

How to print dir tree of a 7zip archive?

Before extract archive.7z, I always check what in side: $ 7z l archive.7z ...SKIP... 2010-01-01 00:00:00 ..... 25856 7367 jsloader/resource/gre/modules/source-editor-textarea.jsm ...
0
votes
1answer
66 views

brew doctor giving error on a directory that has been removed

I just installed homebrew and as suggested, I ran the brew doctor command. I am linux newbie and do not know how to fix most of these things. But I would like to ask especially about the following ...
0
votes
1answer
41 views

using emacs shell with gnu screen?

How can I use a bash shell in emacs (M-x shell) when I am trying to connect restart a GNU screen session (on a remote ssh connection)? When I try it, I get: avilella@remote-machine-002~$ bash ...
2
votes
2answers
40 views

Symlink to current folder as absolute path without typing whole path

Symlinks are saved shortcuts for relative paths: ~/foo➤ ln -s . ~/bar/foo ~/foo➤ ls -l ~/bar total 8 lrwxr-xr-x 1 me me 1B 15 May 14:38 foo -> . The file ~/bar/foo is a symlink to bars ...
13
votes
4answers
359 views

Undo tar file extraction mess

I just untar'd an archive that produced a mess of files into my tidy directory. For example: user@comp:~/tidy$ tar xvf myarchive.tar file1 file2 dir1/ dir1/file1 dir1/subdir1/ dir1/subdir1/file1 ...
0
votes
2answers
27 views

bash: ./wls1036_solaris32.bin: Invalid argument

Having some experience in ubuntu, I installed solaris 11g recently to work on WebLogic. I've downloaded wls1036_solaris32.bin file. When I run ./wls1036_solaris32.bin in the terminal, I'm getting ...
1
vote
1answer
95 views

“php: command not found” after changing PHP system files in OS X

I wanted to install Symfony on Mac OS X Lion. Apparently, as MAMP was already installed on my computer, there was a problem with the "timezone" field in the php.ini file. I can't remember exactly the ...

1 2 3 4 5 40