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

learn more… | top users | synonyms

2
votes
1answer
171 views

Copy all files in a folder which have the same name as files in a separate folder

Let me explain: I am going through a huge icon set, and choosing the icons I like. I have chosen maybe 250 out of 3000 icons. The way the icons are split up are like this: Icons -> 16x16 ...
0
votes
2answers
171 views

How can I run a command on disk error?

System: Debian Squeeze What's it for: A System where any new disk is DoD Wiped. I'm looking for a method to fire a command on a disk error that the kernel throws, sometimes we get bad disks and it ...
0
votes
2answers
796 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. ...
-2
votes
3answers
497 views

A file which is not a dir nor a file

This may look like a weird question, but I just got this output for a file (directory?) in my system. This may be a trivial or well-known error, but for me, this file (directory?) called ...
6
votes
5answers
8k views

rsync using regex to include only some files

I am trying to run rsync to copy some files recursively down a path based on their file name pattern, case insensitive. This is what I have done to run rsync: $ rsync -avvz --include ='*/' ...
0
votes
1answer
2k views

How can I manually set the CPU frequency?

I have tried the following from shell: cat scaling_governor userspace cat scaling_available_frequencies 3326000 3325000 3192000 3059000 2926000 2793000 2660000 2527000 2394000 2261000 2128000 ...
0
votes
1answer
568 views

PDF Shell Extension Handler [duplicate]

Possible Duplicate: How can I view and sort after the page count for multiple PDF files in a Windows file explorer? Is there any Shell Extension Handler for Windows 7 64b, that can show PDF ...
0
votes
3answers
4k views

How to grep logfile via SSH on multiple servers?

Sometime, I need to find out specific log content(such as api call) from log files, those log files exists in several Linux servers. I have to use SSH to login every server and use grep searching the ...
1
vote
2answers
340 views

zsh completion doesn't work under Cygwin for other drives

I'm on Win7 x64, Cygwin 1.7 and zsh (and using oh-my-zsh). Zsh newbie here. I've reviewed zsh autocompletion not working on cygwin and tried the solution there but no luck. My mount table: C: on ...
0
votes
2answers
80 views

rsync {braces} fail?

I need some help in this issue: I want sync /path/first/ with /path/second/, /path/third/ ..etc so I've tried this: rsync -rv /path/first/ /path/{second,third,fourth}/ But it worked only for last ...
2
votes
1answer
82 views

How to list all scripts called by a master script?

I want to list all scripts (recursively) which are being called by a master script. For example: master.sh a.sh >> this script calls a1.sh, a2.sh, a3.sh etc b.sh >> this one calls b1.sh, ...
0
votes
3answers
383 views

What does -p do on shell script?

Does on -p [val] from shell start a process at a specific priority?
0
votes
1answer
450 views

why .profile under home directory does not work when log in

I am a newbie to UNIX. I am using mac OS X 10.8. I created .profile under home directory. However, it does not work when login. I always have to force it to work using the command $ . ~/.profile. Can ...
3
votes
1answer
251 views

Filter interactive output (top)

How can I filter the output from a "self-updating" program such as top while keeping its functionality intact? For example, I want to highlight my user name in top's output. My idea is to use ...
7
votes
8answers
16k views

How to find out the top space-consuming directories or files?

My disk is running out of space: $ df -h Filesystem Size Used Avail Use% Mounted on ... /dev/sda7 803G 715G 48G 95% /home I'd like to go through the whole home directory and find ...
0
votes
1answer
141 views

How to return to shell prompt in xterm linux?

When I do this: [myuser@myserver ~]$ find . -type f -name "*Myfile* -name "*20130*" > It enters ">" mode, and I can't exit it. How do I retun to shell prompt?
1
vote
0answers
127 views

Windows cmd only uses Linux commands

I'm using Windows 7 and for some weeks I can't use Windows commands (e.g. taskkill) anymore but Linux commands (e.g. ls, kill, ps,...) instead. The problem seems to be that it is not using my PATH ...
2
votes
2answers
539 views

Converting bash to zsh: declare function and if statement

I have copied this code from somewhere and am trying to modify it for my needs. It was designed for bash but I am running it under zsh. I always have trouble running bash scripts under zsh, as there ...
0
votes
1answer
426 views

linux logrotate how to set rules for all log files in an directory(including files in sub-directory)

For example, I want to set rules for all files under /home/example_user/public/ and all logs are actually located in different sub-directories like this: /home/example_user/public/siteA/access.log, ...
0
votes
1answer
393 views

Sourcing bash_prompt (bash script) when running zsh (oh-my-zsh)

I have a theme that is written in bash (I think). However, I have decided to use zsh for my shell. More specifically, I'm using oh-my-zsh (a customised zsh I believe). The theme I want to use is ...
0
votes
1answer
95 views

Emacs always starts shell in home directory with Windows 7

Running GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601) on Windows 7, the shell command (M-x shell) always creates a DOS box with the home directory. I've seen in other questions/answers that the ...
6
votes
1answer
292 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 ...
1
vote
3answers
235 views

Can a user belong to a hidden group in Linux?

Is it possible for a user to belong to a group in Linux but that the group name is not listed in the group file in /etc directory. If so, what are some examples?
3
votes
1answer
579 views

Script-specific autocomplete in shell

I create a lot of little scripts to help me in my every day life. I would like to provide auto-complete for them, specially that I intend to share them with people. Now, I know I can create ...
1
vote
2answers
713 views

How to “shut off” all networking on Linux from bash?

I'd like to write a bash/shell script that "turns off" the machine's ability to communicate over it's network card, effectively shutting down all networking. From the command line: # To turn all ...
0
votes
1answer
931 views

cp -r overwrite

This is not a problem as much as my curiosity of the different cp -r behavior. This is on the latest Ubuntu. I have an outdated copy in a directory with several subdirectories. I'd like to update the ...
3
votes
1answer
237 views

Redirect stdout to multiple programs

I'm doing some stream processing of some quite substantial files-- I was wondering if there was a way to split stdout in order to pipe to multiple programs. What I'd like to do is something like this: ...
0
votes
1answer
318 views

copy a file with scp, which is not stored on a filesystem

I need to copy a .war file, which i currently just can reach over the UI with "http://server:host/directory/my_file.war". So its not stored on a fileserver. Im logged on a server A and the file needs ...
0
votes
2answers
454 views

rename multiple file add number to name using batch

I have files in folder named unix_aaa.txt unix_bbb.txt unix_ccc.txt and so on. How do I change all the files that start with unix to names like 001_unix_aaa.txt 002_unix_bbb.txt 003_unix_ccc.txt ...
-1
votes
1answer
43 views

Would shell command join cause out of memory?

I have two file to join. FILE 1: a A1 a A2 a A3 ... c C1 c C2 ... FILE 2: a feature1_of_a a feature2_of_a ... a featureN_of_a ... ... c feature1_of_c c feature2_of_c ... after join, i ...
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: ...
2
votes
2answers
192 views

How to delete all folders that have the same name as their parent folder?

Somehow I got a copy of every folder inside itself. What is the shell command I could run to delete all folders that are inside folders of the same name? For example in the above, running the ...
0
votes
3answers
54 views

Perform shell operation through secure shell

Is it possible to perform a shell operation from a bash script through a secure shell. Here is an example of why you may want to do this. Lets say you have a simple unix operating system that you ...
2
votes
4answers
2k views

Get a script to run at startup (linux)

I am trying to get a simple script to run automatically at startup. A friend told me to do this but it did not work. Could someone take a look to see what it is missing? *(Also I am brand new to ...
1
vote
1answer
234 views

Pass filename to shell script

On Windows, I can drag and drop a file to a batch file to pass the filename. On Ubuntu 12.10, I can't drag and drop to an .sh file. Opening terminal and running ./sh-file-name.sh file-name.txt ...
0
votes
0answers
369 views

Automation script to SCP from UNIX to Window Server

I'm new to server/Unix trying to transfer file between AIX to Windows I'm trying to create SCP or SFTP script that will run on cron and transfer text file on /usr/apps/11.111.1.11.log file to window ...
2
votes
1answer
115 views

unix move cursor after last character

After I use my arrow key to move my cursor left, I am unable to move it back to the end of the line. For instance: If I type: $ echo hello wordl_ Then if I move the cursor left to fix typo $ ...
1
vote
2answers
388 views

How to disconnect a running bash job from the shell in Linux?

I have a script that starts a server on a remote VM. All works great until I close the shell where I executed the script. When the shell closes, so does the server. After some looking around I found ...
0
votes
1answer
244 views

tar -rvf not working

I am trying to append a .txt file to my already created .tar archive file. But the following error is showing up: tar -rvf kits.tar example.txt tar: This does not look like a tar archive ...
1
vote
1answer
111 views

Stream the contents of a text file that is being continuously written to.

So I have a python script which is executed by cron job on a nightly basis to capture data on my data server (Ubuntu 12.04 LTS), this data is being written to a text file. Is there a command to stream ...
2
votes
2answers
836 views

Tool for diffing large files

When I use "diff" to find the difference between two large data files, diff A.txt B.txt > dif.info it is output: diff:memory exhausted or add the argument "-H" diff -H A.txt B.txt > ...
2
votes
1answer
2k views

Horizontally split-screen with two programs?

I have two programs A and B. I want a single command, which will run Program A and Program B in two different terminals but in the same tab, i.e, in a horizontally split terminal. I know screen can do ...
0
votes
1answer
279 views

shell script : rsync exclude

I'm building a shell script and at some point I'm excecuting thie command : rsync -arv --delete --exclude=".svn,*.db,.DS_Store" Source/ Dest/ However it seems the my exclusion doesn't work. Am I ...
1
vote
1answer
275 views

Is there a way to reverse-search zsh history with more than one search term?

I'd like to be able to reverse-search (CTRL+R) on zsh, but have the commands searched using more than one search term. For example, I'd like to search through commands that included both "scp" and ...
1
vote
2answers
443 views

Difference between running commands locally vs using SSH to make remote commands

I am trying to SSH into a remote machine, and run a .ksh file on a that machine to run a Java program. If SSH into the machine with a tool like Putty, and run this command: cd ...
0
votes
2answers
185 views

How to start a local server and open it in a browser from a shell script

I have a test suite which runs in a browser (using QUnit, though that's unimportant). The test suite requires a local server running on a particular port. Running the tests currently involves a few ...
3
votes
2answers
3k views

UTF-8 locale portability (and ssh)

I spend a lot of my time sshed into various machines, all of which are different (some are embedded, some run Linux, some run BSD, &c.). On my own local machines, however, i use OS X, which of ...
0
votes
0answers
97 views

Running different programs via ssh

I got some problem when I tried to run different programs via SSH. The problem is, let's say I have 2 different java programs, then I would like to run them simultaneously on different JVM, in order ...
1
vote
1answer
502 views

Increase width of command line / cmd.exe? [duplicate]

Possible Duplicate: Widen the Win 7 command prompt window? Any way to change the width of the windows command line / cmd.exe? How about using another "shell", is that possible?
5
votes
1answer
180 views

Explaining the -W flag for rm

What does the -W flag for rm do? According to its man page, the flag attempts to "undelete the named files." And currently, "this option can only be used to recover files covered by whiteouts." What ...