Page 1 of 1

Help with Unix

Posted: Thu Apr 09, 2009 9:24 am
by kibito87
So I have this quiz my teacher gave me and i'm having a little trouble trying to find what these commands do...I can either type them out here or if you wouldn't mind contacting me on AIM or via PM's that would be awesome.

echo*
echo /*
echo \*
echo "*"
echo
echo */*
rm *

Then if you wouldn't help me further i'd greatly appreciate this. :D

Re: Help with Unix

Posted: Thu Apr 09, 2009 10:55 am
by sneakyn8

Re: Help with Unix

Posted: Thu Apr 09, 2009 11:28 am
by shadowkhas
Or, man <command>

Re: Help with Unix

Posted: Thu Apr 09, 2009 1:19 pm
by kibito87
Sneaky, i'm talking strictly unix not linux. Shadow, what?

Re: Help with Unix

Posted: Thu Apr 09, 2009 5:15 pm
by Altimit01
He's saying use the man page from your terminal. Also echo and rm should behave the same for linux and unix. They're such basic commands that the differences if present would be minimal.

Edit: it would be a very bad idea to run the last command from your terminal. Just saying.

Re: Help with Unix

Posted: Thu Apr 09, 2009 6:24 pm
by WaeV
As long as you weren't running as root, would the last command do anything?

Re: Help with Unix

Posted: Fri Apr 10, 2009 5:51 am
by FleetAdmiralBacon
WaeV wrote:As long as you weren't running as root, would the last command do anything?
It would delete everything in the current folder that you have write access to. (But not subfolders.)

Re: Help with Unix

Posted: Sat Apr 11, 2009 9:57 am
by MarsMartianMan
I got a gigantic wall of text, looks like my entire HDD's contents.

Your teacher is evil.

Re: Help with Unix

Posted: Sat Apr 11, 2009 5:44 pm
by Altimit01
echo */* will do that. wouldn't expect anything less really.

Re: Help with Unix

Posted: Sat Apr 11, 2009 7:24 pm
by kibito87
Altimit01 wrote:echo */* will do that. wouldn't expect anything less really.
Why would both do the same thing tho? So having the wildcard before or after the forward slash means nothing?

Re: Help with Unix

Posted: Sun Apr 12, 2009 7:20 am
by LuxuriousMeat
kibito87 wrote:
Altimit01 wrote:echo */* will do that. wouldn't expect anything less really.
Why would both do the same thing tho? So having the wildcard before or after the forward slash means nothing?
No, I'm assuming the wildcard is before the / too so it will do files in parent folders if your current directory isn't the root of the file system.

Re: Help with Unix

Posted: Tue Apr 14, 2009 11:18 pm
by noxiousraccoon
The built in echo command writes out any words that follow it on the same command line to standard output so it's output can be directed to a file.