Sponsored Content
Top Forums UNIX for Dummies Questions & Answers space-asterisk in bash killed my server Post 302348593 by treesloth on Friday 28th of August 2009 04:24:28 PM
Old 08-28-2009
space-asterisk in bash killed my server

So, here's the deal... I was attempting to type this:

Code:
>  grep -R "searchterm" *

and somehow I typed this instead:
Code:
>  grep -R "searchterm"

>   *

I accidentally typed "space-asterisk" on the second prompt. This apparently caused Bash to attempt to run the first file in the pwd, which happened to have *something* that spawned a load of processes and killed my server (a VPS with fixed process count). I've never seen this. Can anyone explain the "space-asterisk" phenomenon? It seems like the sort of thing that's a subset of a bigger form of command line trickery and awesomeness, but I can't seem to put together the right search terms to get Dr. Google to explain it to me...
 

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to trap unix signal if the process killed/interupt occured in bash...

hey champs, I have a process running.......i have to catch/trap the signal when the process is being interupted/killed (kill -9 pid) option...... how can i achieve the same thru my process........ let my process is a.sh and it supposed to take 13 mins to complete, but due to some problem ,... (15 Replies)
Discussion started by: manas_ranjan
15 Replies

2. Shell Programming and Scripting

Use asterisk in shell script bash

Hello, I am trying to save in a file a single "*" but its not working... look what i am doing... FILE="/home/teste/a.txt" ...BEGIN... ASTERISK="*" echo "STRING $ASTERISK STRING" >> $FILE ...END... when i do it, the result is a list of all files of the current... (4 Replies)
Discussion started by: diogooute
4 Replies

3. Shell Programming and Scripting

Print asterisk instead of password (Bash)

OS : RHEL 6.5 Shell : Bash With the following bash shell script, when I enter password, it won't be printed in the screen. But, I would like Asterisk character to be printed instead of the real characters. Any idea how ? $ cat pass.sh echo "Enter the username" read username echo... (3 Replies)
Discussion started by: John K
3 Replies
ZGREP(1)						      General Commands Manual							  ZGREP(1)

NAME
zgrep - search possibly compressed files for a regular expression SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code: (-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If the GREP environment variable is set, zgrep uses it as the grep program to be invoked. EXIT CODE
2 - An option that is not supported was specified. AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1) ZGREP(1)
All times are GMT -4. The time now is 07:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy