A shell is software that lets users interact with the operating system, usually by typing at a command-line.

learn more… | top users | synonyms

1
vote
1answer
40 views

Return control to shell DURING `gvim -f`

I occasionally use gvim -f to start gvim but force the shell to wait for the gvim session to end before resuming execution of whatever it's doing (for instance, I usually edit my bash aliases using an ...
0
votes
1answer
171 views

Error while executing bash command stored in string

Wrote a bash shell script that uses rsync to deploy files to live web server. Right before executing, the script outputs the full command that the my shell script generates: rsync --chmod="ug=rwx" ...
0
votes
0answers
154 views

How to close Genymotion device with shell command?

I need to close genymotion via shell command, does anyone know if it is possible to do this?
1
vote
2answers
783 views

What does the command “chmod a=w g+x alpha” do?

I was asked this question but didn't know what it does. I know chmod and its usages but what does this exactly do ?
0
votes
0answers
84 views

can't execute scripts compiled with shc

I'm trying to use SHC to compile a shell script so that I can set the SUID bit on it and obfuscate what it's doing (I'm attempting to have it run as part of all new users' .bashrc). As a test, I ...
0
votes
0answers
11 views

Remove duplicated images with the shell [duplicate]

I have a folder with osme images. Each of them has a different name but some of them are duplicate. What is the best way to delete the duplicates? I have to do it sistematically so I need some shell ...
1
vote
4answers
358 views

How to columnate text with tabs (in vim or on the shell)

I have a frequent need to manually manipulate tab-delimited text for data entry and other purposes, and when i do this it helps if the text is aligned properly into columns. For example (assuming ...
1
vote
1answer
569 views

How to find out is a program run with nohup or not?

There is no difference in ps -ef | grep sleep output to commands: nohup sleep 60 & sleep 60 & In which way can I discover that program is run with nohup?
0
votes
1answer
68 views

shell or perl script to replace the double quotes with their unicodes

I am having two files names as a.html a.xml in a folder and in a.html file i have a tag <div class="snippet abstract"> We present a new "model" for multiple-input-multiple-output ...
0
votes
0answers
39 views

which command doesn't work after uninstalling fink

I was trying to install something using homebrew.. so it complained that I had more than one package manager (either macports or fink).. so I followed fink's uninstall instructions which instructed me ...
1
vote
1answer
93 views

Bash preexecute

I'm trying to write bash command wrapper, which will be patch bash current command on the fly. But i'm faced with the problem. As i'm not a good Shell user, i can't write right expression of variable ...
1
vote
1answer
221 views

In a Shell scripts, check version of installed package, make a decision based on output

Looking to write a cross distro / cross version shell script that makes sure a forced version of PHP is installed Example: Ubuntu 12.04 has 5.3, Ubuntu 13.10 has 5.5, Debian 7 has 5.4 I need this ...
0
votes
2answers
167 views

ip namespace non-root shell

I am trying to run ssh command to another ip namespace. I can do it right now, but it runs as root. I want to run it as a normal user. I want to know if there is a way to enter a non-root shell in ...
1
vote
1answer
136 views

How to remove files which are copied after running `make install`?

So the question is how am I supposed to uninstall or remove the files that has been installed after running the make instal? (Specially when I stop it in the middle of the process by a "Ctrl+C" or ...
0
votes
2answers
55 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 ...
1
vote
1answer
49 views

confused about file owner in linux

---x--x--- 1 root stapusr 87992 Oct 20 23:44 staprun What I showed above is the owner of file staprun. But user root doesn't belong to groupstapusr. What does it mean? I assumed that before ...
1
vote
3answers
65 views

Enter a string containing “!!” on a shell without it being interpretted

I'm trying to send a string that contains "!!" in it. However, every time I execute it on zsh, zsh replaces !! with the last command entered. How can I get zsh to not interpret "!!"? I have also ...
0
votes
1answer
151 views

uuencode to attach all files in a directory

I am using uuencode and mail to do basic file attachments to an email. $ path/to/targetdir/audio.gsm audio.gsm | mail user@mail.com This works but my problem is I am trying to find a way to ...
1
vote
1answer
193 views

Append text with dynamic value in a text file by echo command in bash

I want to append some text in a file through a shell script. I have the following script bash -c 'echo -e "\nserver.id=$1" >> file.properties' saved in the file script.sh This is how I run ...
2
votes
1answer
357 views

Fastest way to delete a non empty directory in Linux

I use the command rm -rf directory but i came across the following article : Article That suggests that rsynch to an empty folder is the fastest way? rsync -a –delete empty/ a Why is this the case ? ...
1
vote
2answers
447 views

What is the difference betwen /etc/environment and /etc/profile?

I understand that the former is used prior to the latter, but what is the conceptual difference? Is there any good reasons I should set some variables in one and not in other? Except the fact that ...
1
vote
1answer
48 views

Where is virtualenv's deactivate defined?

Virtualenv defines an alias for the command deactivate as seen in yourvirtualenv/bin/activate.csh. What I'm curious about is where deactivate resides, because when I issue an alias command deactivate ...
3
votes
4answers
191 views

Is it possible to delete an MP3 file currently played in mplayer?

I would like to remove an MP3 file that is currently being played back in mplayer. If possible I would like to do it with an mplayer command. So that I don't have to quit mplayer and delete this file ...
0
votes
2answers
183 views

Why won't Cygwin run windows apps that interact with the shell/command line?

After a recent update, Cygwin bash shell works for any commands that don't require interaction, but if an app needs interaction (for example the python shell), it won't work, the prompt never appears, ...
1
vote
2answers
97 views

Remove folder structure from archive, ignore folder while archiving and fix error

I am trying to make a script to backup each of my plesk hosts to individual files, I am having two problems: I would like to remove the folder structure from archive, the tar is 3 folders deep I am ...
0
votes
1answer
335 views

How do I install GNU's 'make binary package' to android shell

I need make to install things, based on my current knowledge: I have reached a chicken and egg scenario. I have root access to the filesystem and shell, but the native android shell does not come ...
0
votes
2answers
175 views

Multiple SSH failing to run more than one command

When a use multiple SSH like below i am only able to run one command, if try to run more than one command its fails. This thing is failing: ssh -o UserKnownHostsFile=/dev/null -o ...
0
votes
1answer
22 views

Nano usablely open second file

Is it possible to open second file into Nano text editor not by browsing files in program interface (it's not so usable because you can't do nothing like search etc in it) but in command line or in mc ...
0
votes
0answers
52 views

Using Remote Desktop Client to access Linux machine: Different environment variables and more

I have an ubuntu machine that I used to use with a monitor connected. Now I only have it hooked up to Ethernet and been using RemoteDesktopconnection from Windows to logon to the Ubuntu machine. ...
0
votes
2answers
72 views

What does the * mean next to a filename in the ouput of the command ll? [duplicate]

I have a doubt related the output of ll command. When, in my shell, I execute the ll command I obtain this output: -rwxrwxr-x 1 andrea andrea 104215 ott 15 15:56 atmosfs* Why I have the * next to ...
1
vote
3answers
241 views

Take all files in dir and for each file do the same perl procedure

I have dir, where are multiple files. a1, bb2, ccc3 At the moment I manually do: perl myperscitpt.pl a1 a1.txt perl myperscitpt.pl bb2 bb2.txt perl myperscitpt.pl ccc3 ccc3.txt How could I do ...
0
votes
2answers
47 views

linux pipeline/tee process sequence

I think for the linux command, the pipeline: $ command1 | command2 | command3 will execute with sequence command1 -> command2 -> command3. But what about using tee: $ command1 | tee >(command2) ...
1
vote
2answers
821 views

SSH session hangs when trying to open a shell

Since this morning I cannot login normally on my server using SSH anymore. Typically, when typing this: ssh foo@bar.org The shell hangs and does not acquire shell. The last line of verbose with ...
1
vote
1answer
40 views

How to fix.. my watch --interval=60 isn't working properly

Here is the code I use in my CentOS 5 32bit. But after this I see only some of files are zipped and a lot of them isn't included in produced gzip file. nohup watch --interval=60 tar -zcvf ...
1
vote
1answer
124 views

Fast way to send current line to the shell in Vim

Say that the current line in Vim contains: ls /home (or whatever shell command). Thus, what is a fast way to send this line to the (bash) shell and read the results in Vim? And without using ...
10
votes
1answer
526 views

Why do we have login, non-login, interactive, and non-interactive bash shells?

So the bash man pages explain what login and interactive shells are: A login shell is one whose first character of argument zero is a -, or one started with the --login option. An ...
1
vote
0answers
47 views

shell script for finding the unix noun phrase

one entry in the on database is: LPE-1*story#1/1 of pearl#1/2*historia de la perla*storia della perla* histoire de la perle* história da pérola*istoria perlei*TOPIC The fields are separated by ...
0
votes
0answers
135 views

What ever happened to BBLean (Black Box Windows Shell?)

So I just found out about people created alternative Window shells. I found this out by finding out about Black Box or bblean. My question is, whatever happened to these nifty shells? This beats ...
0
votes
3answers
145 views

Shell is interpreting IFS=$'\n' as IFS='n'

I am using a Bash shell on a Ubuntu 12.04 LTS server, and it seems that IFS=$'\n' is being treated as IFS='n'. Script in use: concat=$(echo -n "concat:" && find ...
1
vote
1answer
807 views

Adding a month to an input date in unix

I need to write a script that asks user for an input date. Then I need to add a month to that date or at least 30 days. Example: Date: 2009-05-12 I need to get 2009-06-12 this code is not working: ...
1
vote
1answer
79 views

Linux who --process option

I was playing around with who when I noticed that the who -p option does not give any output. Running the command as root also didn't change the output. I tried this on a CentOS, Ubuntu 12.04 and ...
0
votes
0answers
27 views

Remote URL Completion in Bash

I'm currently adding support for remote url completion for svn in Bash. I'm currently using a modified bash-completion-svn that figures out when to trigger the completion on URls looking like ...
0
votes
1answer
165 views

Ping test for 4 hours

I am trying to perform a ping a test to the servers for 4 hours I tried using ping -t '14400' IP-ADDRESS but i am getting a following error: "ping: ttl 14400 out of range" Is there any other ...
0
votes
1answer
74 views

Terminal auto-complete with @ symbol?

I have multiple directories that include the @ symbol within the directory name. When I do the normal tab to auto-complete a directory name it chokes if there is an @ symbol included in the name; ...
1
vote
2answers
66 views

ffmpeg resulting bitrate higher than expected. did i miss something?

i am using ffmpeg to create some h264 transport streams. the bitrate for video is 496k, for audio 64k. However when the ( 2-pass ) encoding is done, i get a stream with more then 600k. i am using the ...
1
vote
0answers
71 views

Record the sound of a program to the microphone

I want to record the sound of a program and to direct it as an microphone entry on linux. For instance, I'm listening a music on youtube, and I want that music to be send to my skype's conversation ...
1
vote
2answers
59 views

How to save linux command?

I am using grep -r [^a-zA-Z0-9]myVariableName[^a-zA-Z0-9] -n JS_files/ as mygrep file grep -r [^a-zA-Z0-9]$1[^a-zA-Z0-9] -n JS_files/ and then sh mygrep myVariableName But then I lose the ...
4
votes
1answer
175 views

How can I delete a just-typed newline character in bash?

I sometimes copy-paste paths into the terminal, and often accidentally copy the newline character. For example, I want to find then read the contents of foobar.txt. $ locate foobar.txt ...
2
votes
1answer
110 views

Is it safe to delete empty directories recursively on Linux?

Using the find command, it is easy to recursively delete all empty directories. Which empty directories are safe to delete, and which ones are not?
0
votes
1answer
108 views

How to prevent users from renaming files while providing write permissions on Linux

For some special purpose, I want to prevent non-root users of the Linux Server from changing the filenames. However, they can modify and write to the contents of the file. How to do this from command ...