Questions tagged [shell]

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

Filter by
Sorted by
Tagged with
12 votes
3 answers
44k views

How to get window title in windows from shell

I can set title via windows shell using command title some string but how can I get the title of some process? I tried command tasklist /v, but my title is very, very long, that's why I receive only ...
loveWinux's user avatar
  • 121
12 votes
3 answers
13k views

How to delete readonly variable in bash?

$ mySite="superuser" $ readonly mySite $ unset mySite bash: unset: mySite: cannot unset: readonly variable How can we delete mySite, as it is a readonly variable?
Yishu Fang's user avatar
12 votes
3 answers
7k views

Is there a folder-specific .bashrc or .bash_profile?

Is it possible to have a bash script (like a .bashrc or .bash_profile, basically) that is executed only upon cd’ing into a specific folder?
user avatar
12 votes
2 answers
10k views

Download a file without wget or curl

How would one go about downloading a file from the command line without using Wget or Curl?
Zombo's user avatar
  • 1
12 votes
8 answers
14k views

Ending a process in Unix instead of interrupting it

At the Unix command line if I press Ctrl-C,that does not end a process, but rather interrupts it and I return to the shell prompt. So, I have the following two questions: Is there a way i can see ...
user avatar
11 votes
3 answers
31k views

Execute a command stored in a variable

I have a command stored in a variable. Let's pretend the variable $i has the value: cat -nT index.php |grep 'someregex' When I try to execute the above variable by typing $i it fails because the ...
Leathan's user avatar
  • 111
11 votes
3 answers
72k views

Using backslash to escape characters in cmd.exe (runas command as example)

I see that the caret is the documented escape character. But, I have an example showing that for the double quote character, ^ doesn't work and you have to use \ C:\>runas /user:Administrator "...
barlop's user avatar
  • 23.8k
11 votes
4 answers
13k views

Run a GUI app on remote computer from SSH

I want to run a GUI application on my Ubuntu computer, but it should started by a shell script on my Debian server trought SSH. Is this possible?
Patrick's user avatar
  • 123
11 votes
3 answers
21k views

TortoiseSVN overlay icons do not appear when installed by a different user account?

I've installed TortoiseSVN on my work Windows XP machine as the administrator. When I login in as a standard user my working copies do not display the overlay icons in Windows Explorer. I found this ...
Camsoft's user avatar
  • 220
11 votes
4 answers
3k views

Why does less tail mode stop working?

Using the less command on linux in tail mode (F command or less -f) consistently stops working on certain machines and/or certain files. New changes simply stop showing up. I know I've fixed this ...
TREE's user avatar
  • 1,277
11 votes
9 answers
10k views

Remove blank pages from PDF from command line

I have a PDF that has some blank pages inserted. These pages are the background colour (grey in this case). I would like to remove these pages using a bash script. It has been suggested that we can ...
gmatht's user avatar
  • 2,367
11 votes
3 answers
1k views

How can I easily see the man page for builtin shell commands?

If I see a command in a script that I don't know and I type (for example) man pushd or man umask I see the man page for builtin commands. I know that I can do man bash and scroll to find the help for ...
jhabbott's user avatar
  • 261
11 votes
4 answers
19k views

How do I log all UNIX shell commands submitted by all users?

Is there an elegant way to log every command submitted in all shells on a machine? This is in the context of an infrequently-used Ubuntu server, of which I am the only human user. (There are several ...
jl6's user avatar
  • 1,175
10 votes
4 answers
3k views

Is it possible to use a shell script in the sendto folder?

I would like to use a bash shell script from the SendTo folder. When I put a shortcut to a batch or exe into theSendTo folder it shows up in the shell Send To context submenu, but when the shortcut ...
Adrian's user avatar
  • 602
9 votes
2 answers
18k views

How do I create a shortcut that opens Cygwin bash shell on a directory of my choosing (UNC especially)?

Given a standard installation of Cygwin for Windows XP, I would like to create a standard Explorer shortcut that opens a bash shell already open on a directory of my choosing. The directory is a UNC ...
Kit's user avatar
  • 485
9 votes
6 answers
6k views

What is the difference between "Shell" and "Terminal"? [duplicate]

I am fairly new to Ubuntu and I am loving it! But I don't quite understand the difference between the shell and the terminal. Can any one explain? Someone told me that a terminal is just a "tool" to ...
smilingbuddha's user avatar
9 votes
4 answers
3k views

Running `exec` with a Bash built-in

I defined a shell function (let's call it clock), which I want to use as a wrapper to another command, similar to the time function, e.g. clock ls -R. My shell function performs some tasks and then ...
anol's user avatar
  • 1,741
9 votes
2 answers
5k views

Invoke zsh, then *source* another file (while entering interactive mode)

This question is of course related, but different to the one about executing a command. That questions’ solutions involve either starting a subshell – which isn’t possible due to the requirement of ...
flying sheep's user avatar
9 votes
4 answers
13k views

UNIX shell scripting: how to recursively move files up one directory?

I have a large number of small files, f, arranged in a directory structure like so: /A/B/C/f There are 11 directories at the level of A, each with about 100 directories at the level of B, each with ...
jl6's user avatar
  • 1,175
9 votes
6 answers
17k views

Why does my LD_LIBRARY_PATH get unset launching terminal?

I have a shell script to set up some environment variables and launch whatever program I send in as an argument: export PATH=$HOME/local/bin:$PATH export LD_LIBRARY_PATH=$HOME/local/lib:$...
kjfletch's user avatar
  • 873
8 votes
1 answer
3k views

Ps command and grep

Why does ps -ef | grep $$ shows the grep command in the process list? Isn't the grep executed after the ps is has finished his work?
Mulligan's user avatar
  • 689
8 votes
3 answers
9k views

How to make zsh completion like bash

I am using zsh. It is a nice shell, especially for the auto completion function. But, when I press tab, it always auto fill with the first completion option. For example, there are two files in my ...
HXGuo's user avatar
  • 607
8 votes
2 answers
7k views

execute command after process terminates in different shell

I am running a command that's processing some data in one shell window (let's say it has pid 200). Unfortunately I forgot to add the & to run it in the background. I need to run some analysis ...
Damonkashu's user avatar
8 votes
2 answers
4k views

Smart tab completion (for directories)?

Are there shell versions that have a more intelligent tab completion? I'd like to be able to type cd foo-<TAB> Then it would show me the possible completions along with numbers that I can ...
dehmann's user avatar
  • 2,293
7 votes
2 answers
3k views

How can I get emacs under windows to autocomplete paths in shell buffers using "\" instead of "/"?

I'm using emacs to work on linux, windows, osx and everything is fine except one annoying problem with shell buffers under windows. Autocompleting filenames would work great (better than standard ...
6502's user avatar
  • 145
7 votes
3 answers
9k views

Command prompt takes 7-8 seconds to load in Windows 7

When I go to Run and type cmd, it takes about 7-8 seconds for the command prompt to appear. I have a Core i5 with 3GB of RAM running Windows 7 x86. I really need the command prompt to run instantly ...
Nandun's user avatar
  • 333
7 votes
1 answer
42k views

Bash & 'su' script giving an error "standard in must be a tty"

Folks, I'm having an issue with a bash script which runs a particular command as a different user. The background: Running on a Linux box (CentOS), the script is quite simple, it's starting the ...
shaond's user avatar
  • 685
7 votes
1 answer
1k views

oh-my-zsh history expansion on space or tab but not enter

In zsh with oh-my-zsh you can enter a history expansion command and press either space, tab, or enter, and it will expand out. For example: ls /path/to/some/directory cd !$<enter> would expand ...
Matthew's user avatar
  • 1,318
7 votes
4 answers
10k views

ssh without using the user's default shell

There was a vote to close this as "unclear what you're asking". Apparently being thorough isn't a good thing, so I'll be terse: When you SSH to a remote host: is it possible to execute a program ...
Brian Vandenberg's user avatar
7 votes
4 answers
9k views

Convert symbolic links into corresponding target files [duplicate]

I have several symlinks to other files in a directory. I want to convert these links into independent files. Is there a command that does this?
Utkarsh Sinha's user avatar
7 votes
2 answers
5k views

Bash: Find folders with less than x files

How would I go about finding all the folders in a directory than contain less than x number of .flac files?
Leda's user avatar
  • 431
7 votes
5 answers
13k views

Is it possible to open a remote terminal session on a Windows XP machine?

Remote desktop is... useable, but I'd like to get a proper remote terminal window open on the Windows XP machine, like I'm able to with Linux. A quick Google points at this, but it looks like it's ...
Krougan's user avatar
  • 183
7 votes
2 answers
3k views

Potential issues with adding /usr/local/[s]bin to root's path?

I've noticed that the root account $PATH does not include /usr/local/bin or /usr/local/sbin by default. Are there any potential issues that could arise from adding those directories to the path? If so,...
jmlane's user avatar
  • 227
6 votes
4 answers
4k views

Windows 7 - Add shell command for .png file

On Windows XP, you could go to Folder Options - File Types, select PNG, create a new action, such as this Action: Crush Application: "F:\Programs\PNGCrush\crush.bat" "%1" So you can right click on a ...
Aximili's user avatar
  • 533
6 votes
4 answers
25k views

How do you replace the logon shell with iexplore?

This is related to my previous question. Apparently I didn't know what I thought I knew.. Like said in my last post, I am looking to make a kiosk where when it starts up, it goes straight into ...
KevinDeus's user avatar
  • 317
6 votes
4 answers
5k views

Does "chmod 777 .* -R" chmod parent directories (..)?

Does chmod 777 .* -R change the mode of parent directories (..) recursively?
Olivier Lalonde's user avatar
6 votes
1 answer
2k views

Is there a Unicode-aware LC_COLLATE sort order which respects punctuation?

As far as I can tell, setting the environment variable LC_COLLATE=en_US.utf8 changes four things compared to LC_COLLATE=c, regarding how programs like ls will sort files: Unicode characters are ...
smls's user avatar
  • 161
6 votes
2 answers
33k views

How to stop shell script if curl failed

I have script that used curl when i pass wrong parameters to script curl failed but script continue executing. I have tried use curl -f/--fail parameter but problem does not solved. What is the best ...
Steelflax's user avatar
5 votes
3 answers
15k views

What is the default terminal (shell) for Xubuntu?

What is the default terminal (shell) for Xubuntu? Does Xubuntu use the same shell as Ubuntu?
joni 's user avatar
  • 51
5 votes
3 answers
12k views

What is the difference between Linux (Ubuntu) and Mac shell commands?

I use Ubuntu at work and a Mac at home. I was trying out some shell commands on my bash terminal on the Mac today but they didn't work. I was told both machines should operate UNIX commands so the ...
test_tube_baby's user avatar
5 votes
2 answers
6k views

How to check what slows down my terminal startup?

Is there a way to check what slows down my terminal startup? I'm using zsh with ohmyzsh on iTerm2. It takes about 10 second to open a new window :( This is my zshrc file: export PATH=/usr/local/...
patrick's user avatar
  • 153
5 votes
1 answer
240 views

Why there is an empty line begin with "*" in the result of history command on linux?

Today at work, I wanna know a history command which I am not very familiar with and I was sure that I just executed a little while ago. However, when I ran history on the same terminal window, I found ...
user3872279's user avatar
  • 1,115
5 votes
3 answers
4k views

nushell: list all files recursively

How can I list files recursively with the nu shell? More specifically: All files, folders and everything else in a specified folder and every inner folder, recursively. I tried ls **, but that does ...
user194860's user avatar
5 votes
3 answers
2k views

Do aliases slow down a shell's start?

Sometimes my shell (zsh) takes longer to start than usual (I open the terminal, and it hangs a bit until I can input commands). I have a few aliases on my .zshrc (well, actually they're in a ...
user137369's user avatar
  • 1,073
5 votes
3 answers
2k views

How can I integrate Meld with the Windows shell?

I moved from using Linux Mint to Windows 10. I have installed Meld for windows. How do I get 'meld' to appear when right-clicking after I have selected two files in Windows Explorer?
happybuddha's user avatar
5 votes
2 answers
10k views

Command Prompt - Shell, Terminal, Console?

I know that cmd.exe is a console program. When you run that program, it opens your standard black and white rectangular window. Within that window, there is the Command Line Interpreter denoted by >...
pstatix's user avatar
  • 245
5 votes
3 answers
11k views

How do I automate borg backup?

Background I would like to use Borg Backup as a backup solution for my Ubuntu server. They offer a very convenient sh script that they say you can just run as a cron job, but it is not working for ...
sgbrown's user avatar
  • 221
5 votes
1 answer
3k views

Bash: color prompt and command differently from output stream

I'd like to color the prompt and command of my shell differently from the text printed in the output stream. My current export for PS1 is as follows: export PS1="\e[0;36m\h:\e[m \e[1;33m\w\e[m\[\033[...
Ryan Atallah's user avatar
5 votes
2 answers
6k views

Find files but exclude several directories?

How do I use find to list every single file but exclude a handful of directories from the search? find / -type f -not -path "./foo*" -not -path "/bar*" -print I've seen examples on other ...
super-frustrated's user avatar
5 votes
1 answer
8k views

ssh ForceCommand vs. ProxyCommand

I need to have a group of users hop through a server ('bastion') into another machine ('dest') via ssh to commit code. Seems like my options are: tell users to use ProxyCommand in their .ssh/config ...
lorenzog's user avatar
  • 2,260

1
4
5
6 7 8