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

learn more… | top users | synonyms

0
votes
1answer
27 views

Tried Installing ZSH through cygwin and then trying to use zsh through Cmder

I tried to install Cygwin (64 bit version) on my computer, and it went through hunky-dory until at the very end, autorebase.bat failed with exit code 1. I read through the logs and they weren't too ...
1
vote
4answers
52 views

How to rename a lot of files in bash shell?

Sorry for the question. I searched the internet a lot, but couldn't find an answer which worked (though there were a lot of suggestions). So, I want to rename A LOT of files. Writing all file names ...
4
votes
4answers
2k views

Linux : To monitor a Service and restart if stopped?

Actually I'm not so sure whether i should use Shell Scripts, or if there some ways already. But whatever approach we use, i would like to keep a Service running all the time. Let's say iptables as an ...
2
votes
1answer
50 views

Hex of filesize

I am following a tutorial on few kernel dev. I encountered an operation where I have to use dd like dd ... if=PBL.bin of=... count=block_number The block_number variable is defined to be as The ...
0
votes
1answer
14 views

psql ignores my PAGER variable

I want to use less as my default pager. Therefore I have PAGER=less in my .bashrc. It's sourced properly: $ echo $PAGER less However, psql still uses more if I call it with psql. BUT: If I call it ...
0
votes
1answer
29 views

Small bootable package to enable ssh client?

I've been trying to find the smallest possible package to put on a cd/thumbdrive that will allow me to use an ssh client on a wired networked computer. I'm talking about really barebones stuff, no ...
0
votes
1answer
14 views

exiting current terminal in a script

I have made alias for running certain program and i have put it in .bashrc file. I want to close current terminal inside the script. I've tried this but it is not working. alias mp='java -jar ...
-2
votes
1answer
35 views

how to run command in another terminal in Linux script

In Linux shell script I have to run few commands under another user but I am enable to. Please advice some suggestions. $ jumpto -T -u ... after this command it enters in another terminal and I ...
0
votes
1answer
34 views

stop all child processes when 1 of then returned exit code 1

I have 2 or more build processes to run in background. I want to stop all the build processes if one of them exit with code other than 0. ./build-1.sh & ./build-2.sh & ./build-3.sh & wait ...
0
votes
0answers
19 views

Vista 32bit Ultimate Shell Folder “Videos” disappeared

Forgive me if my terminology is not correct, I am referring to the special Blue folders in Vista which have an additional "Location" tab in their properties window. 500GB disk partitioned into C: ...
0
votes
0answers
20 views

Access script arguments from within script [duplicate]

I have a script that I can run like this: bash myscript.sh -ram 4096M -jar something.jar -dir /home/something I would like to be able to access the variable ram, jar, and dir from within the script. ...
24
votes
7answers
58k views

Copy directory contents using 'cp' command

How do you copy all the contents of one directory into another? For example: $ cd /home/newuser $ cp -a /backup/olduser/* . The problem with the above is that the globing pattern '*' matches the ...
1
vote
1answer
45 views

Batch convert txt file encoding

I have about 700 files that were the results of a closed caption software process. I can open the files on my PC or Mac in a GUI, but when I open it on the server with nano, I get this: ...
0
votes
1answer
37 views

CentOS 6 - Send user defined command from PHP

I have a web control panel and I need my allow my users to send commands to their application. I a similar problem to SQL injection. $user_input='good command'; shell_exec('tmux send-keys session1:0 ...
1
vote
1answer
32 views

Different globbing behavior with same shopts?

I have multiple shells (bash) open on the same machine, and in one of them, globbing seems to have stopped. ls * gives ls: *: No such file or directory, and so on. I figured that I must have set some ...
0
votes
0answers
17 views

Apply new Windows shell context menu item to encrypted files

I am trying to add a context menu item which will only appear if a file is marked as being encrypted. With an AppliesTo entry, I can successfully apply the menu item to only text files with ...
6
votes
3answers
24k views

How can I disable the CTRL-ALT-DEL key combination completely on XP/Vista/7?

I have been googling extensively to figure this out, and nobody seems to be able to give a direct answer. Let me start by saying that I'm NOT talking about requiring CTRL-ALT-DEL to enter logon ...
10
votes
8answers
2k views

Mass renaming, *nix version

I was looking for a way to rename a huge number of similarly-named files, much like this one (a Windows-related question) except that I'm using *nix (Ubuntu and FreeBSD, separately). Just to sum up, ...
25
votes
4answers
16k views

Byobu versus gnu screen versus tmux

So far I have used konsole to manage multiple shell sessions but it seems that byobu, gnu screen, and tmux offer a better support for multiple shells. I have never used neither of them before. One of ...
6
votes
4answers
15k views

echo newline character not working in bash

I have bash script which has lots of echo statements and also I aliased echo to echo -e both in .bash_profile and .bashrc, so that new lines are printed properly for a statement like echo ...
1
vote
2answers
1k views

How come the ls command prints in multiple columns on tty but only one column everywhere else?

Even after using Unix-like OSes for a couple years, this behaviour still baffles me. When I use the ls command in a directory that has lots of files, the output is usually nicely formatted into ...
26
votes
5answers
2k views

Does running commands verbosely make them slower?

I've found myself using the -v flag for lots of applications less and less (especially for trivial stuff like tar and cp). However, when I did and I was, say, unzipping a large file, it would take ...
0
votes
2answers
521 views

Capturing the console output

I am running a Hadoop hive query from shell script. This is how I am doing it in my shell script. echo "SELECT COUNT(*) FROM test" | hive I want to capture the output whatever hive command outputs. ...
0
votes
2answers
236 views

Shell not finding binary when attempting to execute it (it's _definitely_ there)

I have a specific set of binaries installed at: ~/.GutenMark/binary/<binaries...> These were previously working correctly, but for seemingly no reason when I attempt to execute them the shell ...
0
votes
0answers
18 views

mc-wrapper does not exit to MC_PWD directory

I recently installed openSUSE 13.1 and set up the mc in typical why by aliasing mc with mc-wrapper.sh to have it exit into the last working directory in mc instance. However this does not seem to be ...
0
votes
2answers
75 views

Is it possible for a root user to watch others' shell session secretly in live?

I see a similar question on stackoverflow: http://stackoverflow.com/questions/1353253/linux-terminal-how-to-capture-or-watch-other-terminal-session Someone recommends conspy. However, it seems that ...
0
votes
1answer
31 views

Bash doesn't source file unless manually started

bash won't source files from an login terminal unless I manually run bash from a terminal, I have bash (and not sh or dash). When I source a file, it returs errors (like "syntax error near unexpected ...
0
votes
1answer
25 views

starting application with custom initial folder

I am working on linux. Do you know which command to start an application setting an "initial folder" for it. If I start my app from a directory that is not the one containing the app itself, some ...
37
votes
3answers
42k 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 ...
1
vote
1answer
31 views

Using fdisk -r to read disk in Solaris

Upon reading the fdisk's man page on Solaris, I came across the -r flag: -r Read from disk and write to stdout. See -o and -s, which specify the starting point and size of operation. Using ...
1
vote
2answers
1k views

Generating a timestamp to usec accuracy in shell (Busybox)

I want to generate a textual timestamp in the unix shell with microsecond accuracy, without using the %N date option (I am using busybox, a smaller unix toolset that does not have this option), to ...
0
votes
2answers
298 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 ...
-1
votes
1answer
16 views

Record directory sizes on shutdown

What would be the easiest way to record and store the sizes(and a timestamp) of a few chosen directories upon each shutdown - say in a .csv file.
9
votes
3answers
634 views

Figure out what non-symlink path would be?

On Linux, if I've cd'd around and am now in a directory, is there a way to figure out what the real path to that directory is if I had not used a symbolic link to get there? Consider: $ pwd ...
1
vote
2answers
41 views

Execute a previous command in a shell and get the command directly after

Once, a colleague of mine shown me a very useful method (shortcut?) on a shell (bash? csh?) to, after executing a previous command, automatically show the command after in history. For example, ...
-1
votes
1answer
74 views

Run shell script (.sh) from wine

I am new to the wine community. I need some help with a project I am trying to do. I have installed Wine over Ubuntu 14.04 and I have installed ffmpeg on my machine (ffmpeg as a linux program). I ...
-1
votes
1answer
45 views

Using /usr/bin/env to change directory [closed]

I want to automatically execute commands with the prefix /usr/bin/env $/usr/bin/env composer install (this runs OK) $/usr/bin/env cd public (failed ---> /usr/bin/env: cd: No such file or ...
0
votes
2answers
25 views

Piping Several commands in a BASH shell

I am trying to recursively loop through a directory which contains numerous other directories and files and then find all the .rb files and copy them to another directory. This is what I have so far ...
2
votes
2answers
139 views

kioexec with multiple files

We have two environments here at work, and I access the remote machine over ssh. I can do this: kioexec myeditor fish://me@remotemachine/path/to/file.txt But I'd like to be able to do a diff ...
0
votes
0answers
23 views

Running Custom commands in a Terminal Application

I am running a terminal application in /dev/pts/X terminal that has its own console as sampleapp> what I need is to run commands specific to this application but from another terminal.
2
votes
7answers
3k views

Building Unix/Linux programming environment for a Windows developer

I have been a Windows C++/.NET developer for a few years, and would like to start C++ programming in Unix environment. What I think I have to do is to create Virtual Machine, install the version of ...
1
vote
2answers
94 views

How can I replace icons of an application's executable?

I have an application whose executable contains some default icon. Now, I know I can use a shortcut with whatever icon I want, but what I'm looking to do is change the icon without the executable ...
3
votes
3answers
9k views

How to create a new terminal window from the command line in Red Hat Linux 5.3

I use PuTTY to get to my Red Hat Linux 5.3 workstation from my Windows laptop. Typically, if I want a new terminal on my Windows 7 workstation from another terminal or mc, I have to type start ...
3
votes
2answers
529 views

Mac OS X: simple script wanted

I'm looking for a simple script that will do the following. Can anyone take a shot at it (+ if cryptic, please explain what it does), or give me some pointers so I can run this myself? I want to ...
1
vote
2answers
74 views

Equivalent of (foo &>/dev/null &) in Windows shell

I'd like to run a particular application (let's call it foo) from the command line, but I don't want it holding up the terminal, putting any junk in the terminal from its output or error streams, and ...
25
votes
3answers
19k views

Find out if user name exists

How can I find out, in a shell script, whether a given user name exists on the current system? /etc/passwd and /etc/shadow are incomplete. Consider OS X's Directory Services, or Linux with Likewise ...
0
votes
0answers
47 views

is the chromebook developer mode shell a fully capable linux shell

I have enabled developer mode on my chromebook. Is the command line shell a fully implemented linux shell? Would there be any point in installing something like ubuntu?
1
vote
1answer
5k views

What is the meaning of “spawn” linux shell commands ? (Centos6)

I need to know how to setup a cron job that automatically connects to the remote server and change the directory and get all the files in that directory to local i think i have to use sftp but i saw ...
1
vote
2answers
28 views

Start application from a numbered list of choices

I want to display all applications dynamically within a folder in a numbered list, and launch them by entering the number associated with the application. So far I have the easy part working, the ...
7
votes
7answers
5k views

Screen Capture - command line?

Is there a command line tool out there that can record your computer screen and audio device and then save that to a file?