Annoyance

Socializing and general posts on wide-ranging topics. Remember, it's Poststructural!
User avatar
peeplj
Posts: 9029
Joined: Mon Jan 21, 2002 6:00 pm
Please enter the next number in sequence: 1
Location: forever in the old hills of Arkansas
Contact:

Post by peeplj »

Here's a hint: everything you need to answer the question in already in the post.

Here's another hint: if you're particularly clever, you won't even need to know a thing about computers to see the answer.

:lol:

--James
http://www.flutesite.com

-------
"Though no one can go back and make a brand new start, anyone can start from now and make a brand new ending" --Carl Bard
User avatar
beowulf573
Posts: 1084
Joined: Mon Jan 07, 2002 6:00 pm
Please enter the next number in sequence: 1
Location: Houston, TX
Contact:

Post by beowulf573 »

Because your wildcard, .*, included .. which is the parent directory /home.

A guess, I haven't tried it.
Eddie
Outside of a dog, a book is a man's best friend. Inside of a dog, it's too dark to read. -Groucho Marx
User avatar
beowulf573
Posts: 1084
Joined: Mon Jan 07, 2002 6:00 pm
Please enter the next number in sequence: 1
Location: Houston, TX
Contact:

Post by beowulf573 »

chrisoff wrote: At the moment I'm thinking a cigarette, a curry, bottle of wine and 5 or 6 episodes of Firefly (got the box set the other day) while lying on the couch.
I've lived the lack of source control and/or backup before. I once told a company I wouldn't come work for them unless they started using source control instead of zip files on a windows share. Of course, it helps that they were recruiting me and I already had a job.

My wife and I have two episodes of Firefly left + the movie. We're going to be very sad once we're done, it's been a great series. At least Doctor Who will start showing in the States in July again.
Eddie
Outside of a dog, a book is a man's best friend. Inside of a dog, it's too dark to read. -Groucho Marx
User avatar
djm
Posts: 17853
Joined: Sat May 31, 2003 5:47 am
Please enter the next number in sequence: 1
Location: Canadia
Contact:

Post by djm »

I'm guessing that "/home/user3$" in your example is supposed to be your command line prompt. Lots of assumtions here. Users directories are not necessarily in "/home". They could be in "/usr". It depends on the flavour of *nix you are using. I agree with beowulf that your incorrect syntax grabbed the "." and "..". You should have included the slash with the dot to indicate current directory only:

chown user3 ./*

djm
I'd rather be atop the foothills than beneath them.
User avatar
beowulf573
Posts: 1084
Joined: Mon Jan 07, 2002 6:00 pm
Please enter the next number in sequence: 1
Location: Houston, TX
Contact:

Post by beowulf573 »

you also could have done

Code: Select all

/home/user3$ chown -R user3 .
Eddie
Outside of a dog, a book is a man's best friend. Inside of a dog, it's too dark to read. -Groucho Marx
User avatar
peeplj
Posts: 9029
Joined: Mon Jan 21, 2002 6:00 pm
Please enter the next number in sequence: 1
Location: forever in the old hills of Arkansas
Contact:

Post by peeplj »

beowulf573 wrote:Because your wildcard, .*, included .. which is the parent directory /home.

A guess, I haven't tried it.
Bingo!!!

Folks, we have a winner!!!!

Please give the C&F Geek for the Day Crown to the young Norse warrier over there!

Congrats!!!!!!!!!!!!!!!!!!!

Yep, because .* will match .., it walks up to /home and then walks down every directory.

You'd be surprised how many seasoned engineers who have been eating and sleeping this stuff for years will get bitten by that.

--James
http://www.flutesite.com

-------
"Though no one can go back and make a brand new start, anyone can start from now and make a brand new ending" --Carl Bard
User avatar
beowulf573
Posts: 1084
Joined: Mon Jan 07, 2002 6:00 pm
Please enter the next number in sequence: 1
Location: Houston, TX
Contact:

Post by beowulf573 »

Woo hoo! Yes! <i>arm pump motion</i>

Wait, what?

I think the fact that I'm currently installing World of Warcraft is yet another sign of geekdom.
Eddie
Outside of a dog, a book is a man's best friend. Inside of a dog, it's too dark to read. -Groucho Marx
User avatar
chrisoff
Posts: 2123
Joined: Sun Oct 30, 2005 5:11 am
antispam: No
Please enter the next number in sequence: 8
Location: Aberdeenshire, Scotland
Contact:

Post by chrisoff »

I did a good wildcard mistake while at university. I'd saved a couple of html files with a .htm extension but I prefer to use .html. This was for a coursework that was due in at 4pm that day. So I resaved the files with .html and then brought up a command prompt and fired off "del *.htm" then wondered where all my files went.

Thankfully the lecturer told me that although the deadline as 4pm the submissions wouldn't be retrieved until the morning, so I managed to knock up a replacement project by 7pm and get it in.
User avatar
Coffee
Posts: 1699
Joined: Fri Aug 25, 2006 5:41 pm
antispam: No
Please enter the next number in sequence: 8
Location: Anchorage, AK

Post by Coffee »

Oh man! It's like those riddles where you see the answer, but think to yourself: "Nah. Can't be that simple..."
"Yes... yes. This is a fertile land, and we will thrive. We will rule over all this land, and we will call it... This Land."
User avatar
peeplj
Posts: 9029
Joined: Mon Jan 21, 2002 6:00 pm
Please enter the next number in sequence: 1
Location: forever in the old hills of Arkansas
Contact:

Post by peeplj »

Reading back over the thread, I see djm also got the correct answer.

djm, congratulations! You get to share the title of C-n-F Geek of the Day! :-)

Sorry I missed your post earlier.

--James
http://www.flutesite.com

-------
"Though no one can go back and make a brand new start, anyone can start from now and make a brand new ending" --Carl Bard
User avatar
Lambchop
Posts: 5768
Joined: Wed Jul 07, 2004 10:10 pm
antispam: No
Location: Florida

Post by Lambchop »

peeplj wrote: /home/user3$ chown user3 .*

A few minutes later, you get a frantic phone call from user1 and then from user2: "User3 owns all of my files?!?"

Ok, why did it happen?
Because that's the command you issued . . . give user3 all the files in the directory (.*) ???

How should I know?

I'm still wondering how to pronounce !. If * is splat, what's !?
Cotelette d'Agneau
User avatar
beowulf573
Posts: 1084
Joined: Mon Jan 07, 2002 6:00 pm
Please enter the next number in sequence: 1
Location: Houston, TX
Contact:

Post by beowulf573 »

Lambchop wrote: I'm still wondering how to pronounce !. If * is splat, what's !?
"Bang"

<a href="http://www.jargon.net/jargonfile/b/bang ... riously</a>.
Eddie
Outside of a dog, a book is a man's best friend. Inside of a dog, it's too dark to read. -Groucho Marx
User avatar
Innocent Bystander
Posts: 6816
Joined: Wed Aug 03, 2005 12:51 pm
antispam: No
Location: Directly above the centre of the Earth (UK)

Post by Innocent Bystander »

In this neck of the woods, "*" is "star" or "asterisk". "!" is bang, but sometimes "shriek".

Since we are in Unix/Geeky mode, allow me to tell you a horror story.
Its less about UNIX than it is about Databases and user intransigence.


Once upon a time there was a Housing Association. It wanted to computerise its records. They wanted a Rent system. You have a tenant record with a unique tenant number, and a property record (although we call it a "unit" record) which also has a unique code. These two are connected by a rent record, in the system I'm talking about, and as they get charged rent, and with any luck, pay rent, they generate a bunch of transactions which connect to the tenant record, the unit record and the rent record. All three have unique codes which appear in records which concern it. The four records I've mentioned are a gross-over-simplification. In fact there are many more.

We (my company, but me especially) went to install our system for this Housing Association. After we looked at their details we said: "You are operating two companies." They said, " why yes, I suppose we are."
We said "If you want all your tenants in one database, you will need to add an extra digit to the number. If you don't do this you will have endless trouble, you will need more than one database, and there will always be the possibility of confusing the tenant 0001 in one company with the tenant 0001 in the other company. It is important that you do this."

They said, "Unh. No no no nonononononono. Absolutely not."

We said "****!" (sotto voce). It went up to the highest level in our company. We very nearly walked away. Perhaps we should have done.
My boss told me, as long as you only have one set of software, (programs) I'll give you the go-ahead for two databases. I said to him, that's exactly how I see it. So we went ahead.

But that's just to give you an idea of the problem.

As I said, the unit has a unique key, which gets stored in many different records. In Housing Associations, the person in charge of the unit (and a bunch of other units) is called a Housing Officer. Colloquially their charge is called a patch, and by extension, the Housing Officer and Patch are interchangeable terms. Now, people change jobs, and get reassigned. Patches get moved in whole or in part between different people. So it's a REALLY bad idea to have the patch as part of the unique key of the unit. You have to record the patch on the unit, but not as part of they key.
This Housing Association insisted on having the patch as part of the unit key. "We've always done it this way, and we aren't going to change now."

Patches change with tedious regularity every financial year. So every financial year I had the job of changing the unit key on Eighty (yes, 80) tables within the database. It's even more now.

Then after a few years they said: "We're having a major re-organisation and we are going to move all the patches about. Will this be a problem?"

We said, "Yes it will! ...But we can do it."

They said "How long is it going to take?"

I said "I don't know." (Nobody has ever attempted anything this stupid before.) "The best we can do is set it going on Friday night, and with any luck it will be finished on Monday morning."

So we crossed our fingers and set it going.
It wasn't finished on Monday morning. But we daren't stop it (we would have had scrambled database). And I swear, I was phoned every working hour by my oppsite number in the Housing Association. Until it finished.

on Thursday.

P.S.

As a result of this I thought, "There has to be a quicker way of doing this" and created a program which revises keys at about five times the speed of the previous method.

And by the time this Housing Association decided it wanted a different computer system they had sixteen separate databases.
Wizard needs whiskey, badly!
User avatar
Lambchop
Posts: 5768
Joined: Wed Jul 07, 2004 10:10 pm
antispam: No
Location: Florida

Post by Lambchop »

beowulf573 wrote:
Lambchop wrote: I'm still wondering how to pronounce !. If * is splat, what's !?
"Bang"

<a href="http://www.jargon.net/jargonfile/b/bang ... riously</a>.

Hmm, that's a lot more effective than "exclamation point."

So, did I get the right answer or not? :-?
Cotelette d'Agneau
User avatar
chrisoff
Posts: 2123
Joined: Sun Oct 30, 2005 5:11 am
antispam: No
Please enter the next number in sequence: 8
Location: Aberdeenshire, Scotland
Contact:

Post by chrisoff »

Innocent Bystander wrote: A scary story about users and requirements.
It's their own fault I suppose, they got what they wanted.

My old company had similar issues with a certain utility company up here (so you've only got 3 or 4 to guess from). Our experience showed to us that no matter how much aggro it costs in the short term we have to put our foot down when the client tries to put something really, really stupid in a requirements document. It'll save us time and effort and it'll save them money and it'll save a lot of bad feeling in the long term.
Post Reply