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
2answers
108 views

Bash- How to make a Linux script file human unreadable?

I have seen many Linux scripts that are executable but cannot be read as they are in binary format. My question is how I can make my script not readable/binary format?
6
votes
1answer
276 views

Why are some (often long) commands garbled in bash & zsh?

Many times when I enter a long command in bash or zsh (these are the only two shells I am positive I have seen this in) the cursor warps to somewhere in the middle of the string I am entering, can ...
0
votes
0answers
6 views

Staret managed server using Jenkins

I am trying to start web-logic managed server from Linux system. for that I have one shell script start_wls_managed4_btwnpmd01.sh with following code. ...
2
votes
2answers
58 views

What does @ mean at the end of filenames in auto complete in OS X?

I had yadr installed on my laptop, and I decided to get rid of it by running rm -rf ~/.yadr as instructed by its author. However after I did that weirdness commenced: If I try to edit my vimrc and ...
3
votes
2answers
3k views

How to add commands of windows to local shell of XShell 4

XShell is a very powerful tools to ssh remote computers such as Unix/Linux. And it has built some internal commands for you to run within your Windows. Xshell:\> help Internal Commands: new: ...
91
votes
6answers
34k views

Scroll shell output with mouse in tmux

Mouse scrolling doesn't work in tmux the way it works when I run shell without tmux (in Gnome Terminal). It seems tmux sends mouse scroll events as if I pressed Up/Down keys. But I want it to scroll ...
2
votes
3answers
1k views

Vagrant provision script: echo “source /root/.venvburrito/startup.sh” >> ~/.profile fails

I'm running my vagrant provisioning with a bootstrap.sh script. The script runs fine except for one line: echo "source /root/.venvburrito/startup.sh" >> ~/.profile This line fails. I don't ...
11
votes
10answers
3k views

Determine Linux distribution

I am trying to determine what flavor of linux server is running. I am not trying to determine the kernel version - but rater the distributor. gcc is installed, and in the version output, it says ...
1
vote
2answers
39 views

Rename files do the tree folder name in terminal, shell mac or shell linux

I'm working with a tree of folders and files with the structure \ Stories \ 00 \ 0 \ 00000 \ temp.xxx \ Stories \ 00 \ 0 \ 00001 \ temp.xxx ... \ History \ 10 \ 5 \ 10552 \ temp.xxx \ History \ 10 ...
3
votes
5answers
293 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 ...
54
votes
8answers
27k views

Reload a Linux user's group assignments without logging out

When assigning a user's secondary group list using: # usermod -G <grouplist> <user> is it possible to force this group assignment to take effect without logging out all running ...
11
votes
6answers
11k views

Find and delete all the directories named “test” in linux

I have many directories named "test" and I would like to remove them. I know how to find them and print them using: find . -name test -print Now, how to do I remove the directories? Please note ...
3
votes
4answers
28k views
1
vote
1answer
23 views

Linux bash, command replace

How can I erase the - from clipboard? I have a script: #!/bin/bash xclip -o | replace - "" | xclip Bat this doesn't work So replace \- "" take no effect ]$ uname -a Linux localhost.localdomain ...
6
votes
6answers
8k views

How do I set $ variables in unix?

For example there is a long path that I cd to very often. How do I store the path in a variable so that I can use it everytime? For example: I wan to be able to do this cd $path instead of cd ...
0
votes
0answers
27 views

Shell command shortcut using input filename as output filename

Hi could someone help me with a little command shortcut please? Im trying to run an ffmpeg command and was wondering if there was a shorter way to type it, Ive been reading up on parameter expansion ...
0
votes
2answers
20 views

how to know if a device is in use in linux

I use several ways move a large size of data (commands, programs in background, nautilus) some times these programs notify me that the process end but I see the led of my devices is blinking, and I ...
1
vote
1answer
39 views

Linux recursive rename files only

I am trying to recursively rename all files within a directory and subdirectories to lower-case but leaving the directory names unchanged. All examples I have found rename both files and directories ...
2
votes
1answer
69 views

Set timeout on zsh autocompletion

I like ZSH's autocompletion feature, but often it hangs my terminal. I'd like to set timeout on autocompletion so it cancels (kills) itself after n miliseconds.
2
votes
3answers
1k views

How do I su to user login shell directly

I do the following many times a day I login to a server via ssh as user1, I then do su - to become root, then I do su --login user2 to become user2 Is there a way to tell su to go to user2 ...
0
votes
1answer
17 views

Launch a bash sub-shell and expect a command

From a shell script, how can I launch a bash sub-shell for the user & wait for the user to type exit at the bash sub-shell prompt? I tried bash -c expect -c 'expect "exit" {send "Exiting\n"}'; ...
0
votes
1answer
3k views

ksh Auto-Completion PuTTY Configuration

I'm having a bit of a problem configuring my PuTTY client to work with the auto-completion feature in the ksh shell. I do a listing on the root with the directories /home and /homeroot and it returns ...
1
vote
3answers
903 views

Create new empty directory tree from existing tree with files

I have a large directory tree with lots of files. I would like to re-create the directory structure in a new location, but only the directories, not the files. I've checked cp's man page, but don't ...
1
vote
1answer
10 views

How can we configure paths for .cshrc

Within a shell script, i am trying to open a new tcsh shell and load some set of pre defined aliases and env variables which i do not want to have in default cshrc. I cannot have it in my home dir ...
0
votes
0answers
19 views

WES7 - Custom Shell - How to Install Dependencies

Summary Using the Image Configuration Editor for Windows Embedded Standard 7, how can I install applications before a custom shell is started? Background I'm designing an unattended image for ...
3
votes
1answer
107 views

How can I get emacs 24.* under windows to autocomplete paths in shell buffers using “\” instead of “/”?

See How can I get emacs under windows to autocomplete paths in shell buffers using "\" instead of "/"? I use emacs on windows 7, when calling M-x shell, emacs opens a DOS-Shell. ...
0
votes
1answer
16 views

cd to newest directory

Not strictly bash, but rather Bourne shell if possible. How can I programmatically cd to the newest directory? I want to install the latest package of whatever software, which is located in the newest ...
0
votes
0answers
24 views

Run script on SSH login to server

I'm trying to work out how to get SSH to run a script before passing a shell to me. The reason for this is that I will be logging into shared users on many boxes and I want my own configuration when I ...
11
votes
6answers
11k views

Stop Windows 7 Explorer from automatically expanding folders

Windows 7 Explorer can be opened in any folder from the command line. But, it automatically expands (on the left nav panel) the Favorites, Desktop, and [Username] folders. This makes it hard to see ...
1
vote
3answers
53 views

How to remove file modification tracking on an Emacs buffer?

I have a *shell* buffer in Emacs where I get a Linux command line shell interface. On occasion, I wish to save the buffer's contents to disk for future reference were my session to exit and once ...
7
votes
1answer
69 views

What do these cryptic strings really mean in registry associations?

Looking at my HKEY_CLASSES_ROOT\Word.Document.12\shell\Open\command\command value (Word 2010 'Open' shell association) I see this sort of nonsense: ...
48
votes
9answers
63k views

sudo with password in one command line?

On busy days, I'd like to run $ ./configure && make && sudo make install && halt on the night and go to bed, hoping the application would automatically be installed. But ...
1
vote
1answer
27 views

Linux unzip: don't prompt user

I need to unzip a file in my nodejs script: var exec = require('child_process').exec; var execOptions = { timeout: 15000 }; exec('bash unzip.sh', execOptions, function (error) { ... }); In ...
0
votes
1answer
31 views

Where do the variables of a new BASH shell come from?

I am puzzled as about how environment variables work. From what I am aware, for a new process to have some environment variables, its parent must have issued export. But what about all the variables ...
1
vote
0answers
12 views

Triggering KDE's “Attach as tab to” feature from a shell script

I very much like the possibility to attach any window to any other one as a tab in KDE. Particularly, as part of my workflow, I often have a Dolphin (file manager) window attached to a Konsole (shell ...
0
votes
1answer
23 views

Long commands typed in bash overwrite the same line

Since We updated Bash to 4.3.27 when I type a long command, if it reach the end of terminal window, instead of continuing in a new line, it overwrites over the same line using a ">" at the beginning ...
0
votes
0answers
11 views

tmux' “run-shell” blocks for background processes

I'm using tmux version 1.9a and I noticed that run-shell blocks using of any prefix-key commands until the command terminates. To reproduce this just execute run-shell "sleep 10" and try to ...
1
vote
1answer
5k views

How to turn the laptop built-in webcam on/off from shell

Fn+F6 key combination turns my laptop's integrated web camera on/off. Looking at the dmesg output, it seems that the webcam (USB device) is being more or less virtually connected/disconnected to/from ...
2
votes
2answers
1k views

How can I alias a command for sudo?

I have an alias that I would like to use both as a regular user and as root, via sudo. Specifically, it is this: alias rm=trash This works fine as a normal user, and it works fine when I use sudo ...
16
votes
4answers
13k views

Clear terminal using keyboard shortcut

I was curious if there is a way to clear the terminal buffer/output through some keyboard shortcut. I am using Ubuntu. I am aware that Ctrl + L clears the terminal, but you can still scroll back to ...
0
votes
0answers
21 views

Remove shell user folders from explorer dialog? [duplicate]

In Windows 8.1 x64, which registry modifications I should perform to remove the shell folders from this dialog?
0
votes
0answers
7 views

Restrict shell (sh/bash) to a list of allowed parents?

Does anybody know whether is it possible, without modifying the source code, to restrict shell execution to a list of "white-listed" parent processes (in practice getty, x-term, sshd, /sbin/init or ...
1
vote
1answer
37 views

WinRar - Custom shell commands

i'm trying to create custom commands on the context menu in windows. i found this great registry hack here: https://superuser.com/a/376879/395548 this is the code made to work for me: Windows ...
0
votes
0answers
28 views

midnight commander subshell - sharing a history file with the shell mc was started from

I am looking for a way to make midnight commander share its subshell history with the parent shell. To be more specific, when I start mc, open its subshell using Control+o and subsequently invoke a ...
0
votes
1answer
41 views

Shell script force stop without waiting for the exit code

I have written a shell script checklick.sh on my CentOS box with the following content: #!/bin/sh # # description: check link through rtmpdump # . /etc/rc.d/init.d/functions ...
-2
votes
2answers
46 views

linux ^C command to kill process [closed]

^C doesn't always work to kill or terminate(involuntarily) the current process (for instance, if that process is busy in certain network operations).
39
votes
4answers
47k views

What does “2>&1” do in command line?

I know that the > sign is used for output redirection in the command line, but I'm having trouble finding something that explains the use of 2>&1 in the command line. For example: curl ...
0
votes
1answer
499 views

Using the Linux split command to create N Files

I need to split files into guaranteed number of buckets. The size do not have to be equal. Here is my logic count = wc -l filename split_count = (count)/4 split -l split_count filename core_ ...
2
votes
1answer
83 views

Unexpected Bash glob completion uses first match even if ambiguous

If I have the following files in a directory: $ ls a-file-1 b-file-2 something-else And I type $ cat *file*<TAB> The line unexpectedly updates to $ cat a-file-1 | (pipe denotes cursor) ...
0
votes
1answer
11 views

Including and excluding in one regular expression

We're using HP SiteScope system at work to monitor logs and get alerts when a special string or combination of strings is caught. There is one field where the regular expression that catches the ...