Saturday 4 June 2011

School Homework. thanks in advance?

Answer the following questions as briefly (but completely) as possible. Unless otherwise stated, assume a POSIX shell (such as bash) is used.





1.Using wild cards, frame a pattern where the first character is alphabetic and the last is not numeric.





2.How do you remove a file beginning with a hyphen in the $HOME/foo directory?





3.What happens when you use cat foo %26gt; foo? What about sort -f foo %26lt; foo





4.What is a filter command? Where does a filter get its input from?





5.What are two consequences of using double quotes?





6.What are two environment variables are set by reading /etc/passwd when you login? (Actually there are 4.)





7.How would you add the current directory (no matter what it is) to you existing PATH? Why would that be a bad idea?





8.If you run PS1=%26#039;\!$%26#039;, what sort of prompt will you get using the Korn shell or bash?





9.Write a Korn or bash shell alias to list only the hidden files of the current directory. (Extra credit if your alias doesn%26#039;t list . or .. entries.)





10.You have just used the command tar -cvf /dev/fd0 *.sh. How can you repeat the command to use *.pl files instead of *.sh files, in the bash shell, without retyping the entire command?





11.If your .profile contains statements like PATH=$PATH:$HOME/bin and PS1=%26#039;$PWD$ %26#039; and you make any changes to the file, how should you activate the changes?|||1.Using wild cards, frame a pattern where the first character is alphabetic and the last is not numeric.


^[a-zA-Z]*[a-zA-Z]$





2.How do you remove a file beginning with a hyphen in the $HOME/foo directory?


rm $HOME/foo/\-*





3.What happens when you use cat foo %26gt; foo? What about sort -f foo %26lt; foo


cat foo %26gt; foo: foo will be a file size 0. Empty file.


sort -f foo %26lt; foo: foo will be a file size 0. Empty file.





4.What is a filter command? Where does a filter get its input from?


Filter is a concept of excluding/including certain info from the original output. Input is from an output of another command.





5.What are two consequences of using double quotes?








6.What are two environment variables are set by reading /etc/passwd when you login? (Actually there are 4.)


USERNAME (or is it USERID)


HOME


GROUP








7.How would you add the current directory (no matter what it is) to you existing PATH? Why would that be a bad idea?


export PATH=$PATH:`pwd`


Bad idea: Every time you do a cd, your path will keep expanding.





8.If you run PS1=%26#039;\!$%26#039;, what sort of prompt will you get using the Korn shell or bash?


My guess is last command you ran.





9.Write a Korn or bash shell alias to list only the hidden files of the current directory. (Extra credit if your alias doesn%26#039;t list . or .. entries.)


alias ls=`/bin/ls | grep ^\. | grep -v \. | grep -v \.\.`





10.You have just used the command tar -cvf /dev/fd0 *.sh. How can you repeat the command to use *.pl files instead of *.sh files, in the bash shell, without retyping the entire command?


use up arrow key, two backspaces and type sh.


if you set the vi editor, you can use %26quot;k$llRpl%26quot; and enter





11.If your .profile contains statements like PATH=$PATH:$HOME/bin and PS1=%26#039;$PWD$ %26#039; and you make any changes to the file, how should you activate the changes?


%26quot;. $HOME/.profile%26quot; (no quotes) or if .profile is set to have %26#039;x%26#039; flag for owner, just $HOME/.profile will do











All these questions can be easily solved by trying it yourself on the unix shell. All of the answers are from memory. do not have a handy machine with *nix loaded to validate the answers. Good luck!|||If other people do your homework for you then you are not learning anything|||7. PATH=$PATH%26quot;;%26quot;`pwd`; #iirc


8. \!$


5. i) you have to escape all special characters








(i%26#039;m so gonna fail systems programming)

How can I uninstall a program called softkey smash Win95 100?

I just got this game (it%26#039;s a win 95 game) for my computer. I currently have windows vista, and now I cannot uninstall the game. I tried their telephone number and website, but both are no longer in service. I am just wanting to get rid of the thing, it was all these trial games, and nothing worth keeping.





Here is the README:





**************************************鈥?br>

SMASH100.EXE is not shareware or freeware. By purchasing


this CDROM, you have been granted a license to use the


program with this disk. This software is provided


on an %26quot;AS-IS%26quot; basis. Softkey will not make any


warranties or have any liabliity as to the software%26#039;s


operation or the results it produces or fails to produce.


**************************************鈥?br>







I.Installation Problems.


(All references to C: refer to the drive where windows


is installed. D: refers to your CDROM drive)








1) SMASH100 is written using Microsoft(R) Visual Basic(tm) v3.0.


Microsoft(R) and other Visual Basic(tm) custom control (VBX) makers


insist that to preserve the license of these controls


they be installed in the Windows\System directory. Many


shareware or other programs do not follow these guidelines


and hence are in violation of the distribution agreements for


these controls. In addition, they cause problems for those


who do follow the rules. In order to maintain the license


agreement, SMASH100 installs the Visual Basic controls from


each of the programs included on this CD ROM to the


Windows\System directory during the setup of SMASH100.





If during installation or operation of the SMASH100 program


you encounter %26quot;cannot copy%26quot;, %26quot;Invalid property%26quot;, or %26quot;Invalid


file format%26quot; messages or any other problems, please perform


the following steps.





1. Exit Windows


2. At the DOS prompt enter the following commands:





copy c:\windows\*.vbx c:\windows\system


erase c:\windows\*.vbx





3. (optional) type: dir c:\*.vbx /s /p


Locate all vbx files and copy them to the windows\system


directory then delete them from the original location.





4. Restart windows and reinstall the Softkey 100 Smash Windows


Games CDROM by choosing


file/run from Program Manager or File Manager and type d:\setup





In addition, some programs copy VBRUN300.DLL and other VBX files to


other areas besides Windows\System directory. It is advisable to


search your entire machine for VBRUN300.DLL and delete any occurance not


in your windows\system directory before installing Softkey 100 Smash


Windows Games.





This can be done by using the FileManager%26#039;s search under File\Search.








2) In the unlikely event that the setup routine fails, manual installation


can be done by the following instructions: [Remember, this is ONLY as


a last resort, and should not be done until ALL other options have


been tried and have failed.]








1. EXIT WINDOWS





2. At the dos prompt ( C:\%26gt; ) type:





C:\%26gt; CD \


C:\%26gt; MD \SMASH100


C:\%26gt; COPY D:\SMASH100\*.* C:\SMASH100


C:\%26gt; COPY D:\SMASH100\SYSTEM\*.* C:\WINDOWS\SYSTEM


C:\%26gt; COPY D:\SMASH100\SMASH100.INI C:\WINDOWS


C:\%26gt; COPY D:\SMASH100\SMASH100.HLP C:\WINDOWS





3. If your CDROM drive is not %26quot;D:%26quot; then edit the SMASH100.INI and


change the line %26quot;Path=D:\%26quot; replacing D: with your drive


i.e. %26quot;Path=E:\%26quot;





C:\%26gt; EDIT C:\WINDOWS\SMASH100.INI





4. Restart Windows and create a Smash 100 group and


icon in Progam


Manager by following the instructions below:





1. From the Program Manager menu, select File then New


2. Select Program Group option and click Ok.


3. In the Group Name type: Smash 100


4. Click Ok to create the group.


5. From the Program Manager menu, select File then New


6. Select Program Item option and click Ok.


7. In Description, type: Softkey 100 Smash Windows Games


8. In Command Line, type: C:\SMASH100\SMASH100.EXE


9. In Working Directory, type: C:\SMASH100


10. Click OK to create the Icon.





5. If you have further problems, please read the notes above.





3) DISK SPACE - SMASH100 takes up less than 1 megabyte of hard disk when


installed on your computer. During installation, Setup.exe copies


about 500K of files to a temporary directory. These files are


required to install SMASH100 but are deleted after the setup is


finished. It can require 2.5 megabytes to install. If you get the


message that you do not have enough free space to install SMASH100,


move some files to a floppy or decrease the size of your swap file


until you have completed the installation then you can put them back.|||Too complicated, try Perfect Uninstaller and everything goes easy.





Files and registry all wiped out.





Perfect Uninstaller apply for both Windows and Vista.





http://www.perfectuninstaller.com/

To all who know about cmd.exe-how owuld i do this?

what commands would i replace with the originals listed, if i wanted to delete some files...n stuff





1.) First if you have another account other than the system administrator and you can bring up the Windows command Shell which is cmd.exe then your ready.





2.) To open cmd.exe just click on the Start button and click RUN


type cmd.exe once you%26#039;ve done that then your in.





3.) go to the system root directory by typing %26quot;cd\%26quot; without the quotes, next type %26quot;cd\windows\system32\%26quot; OR %26quot;cd\winnt\system32%26quot;


depending on where the Windows [stuff] are located.





4.) once you see system32 at the end of the command line. (warning! here comes the hard part).





5.) start by typing %26quot;mkdir tempdir%26quot; without the qoutes press enter


next type %26quot;copy logon.scr tempdir\logon.scr%26quot; also %26quot;copy cmd.exe tempdir\cmd.exe%26quot; again no quotes, press enter after each line


(type help to understand what you are doing)





6.) next %26quot;del logon.scr%26quot; deletes original logon.scr





7.) next %26quot;rename cmd.exe logon.scr%26quot; renames cmd.exe to logon.scr





8.)%26quot;exit%26quot; quits dos





9.)Now what you have just done is told the computer to backup the command program


and the screen saver file, then edits the settings so when the machine boots the


screen saver you will get an unprotected dos prompt with out logging into XP.


Once this happens if you enter this command minus the quotes


%26quot;net user %26lt;admin account name here%26gt; password%26quot;


If the Administrator Account is called Frank and you want the password *SHEET* enter this


%26quot;net user Frank SHEET%26quot;





10.) and this changes the password on franks machine to *SHEET* and your in.


p.s: dont forget to copy the contents of temphack back into the system32 dir to cover tracks





11.) Now log off the machine, logon.scr is the screen saver that will kick in after 15 minutes of not touching the keyboard/mouse at the logon screen. Wait 15-20 minutes and a DOS prompt with FULL SYSTEM rights will pop up, then just to


C:\%26gt; net user administrator %26lt;newpassword%26gt;


and then log in with the new account.


Try this, might work, as long as he didn%26#039;t change default permissions on C:\winnt and C:\winnt\system32 you should be golden.|||What exactly is it you are wanting to delete that you can%26#039;t do with good old windows explorer?|||you going to mess you computer up if you don%26#039;t know what your doing.

This is a computer aps test people plz help! i have permision to use any resorce...?

ok then im relying on the smart guys and girls out there( like i normally do on yahoo) but lets get started answer plz with the number next to the answer... and believe me my future is litarally in youre hands...








1. what might you want to use a starup disk for?





2. describe how to change the boot process.





3.why would u want to change the boot process?





4. what catagories of information are available in MSD?





5. how would you go about loading MSD to yuore hard disk?





6. wgat is mmicrosoft diagnosis utility?





7. list three ways to create a windows 98 boot disk





8.list and describe three command line prompts other than in question 9 and 10.





9. what happens if you use command dir /w?





10. what happens if you use command dir /p?





11. what command do you use to delete a file?





12. describe the defference between xcopy and diskcopy commands.





13. what information can u gather usingFDisk?





14. what are two types of partitions?





15. what must you do before you can delete and extended partition?





16. what must you do before you delete an primary partition?





17. where can u give a partition a dive lable?





18. what is the difference between a custom instalation and a typical instalation?





19. when would it be best to perform a custom instalationof a operating system?





20. list 2 added controls you have performing a custom custom install rather than a tyiceal install?





21. what website do u go to to update windows?.....





22. where can u find the details to what version u are downloading?





23. why dose microsoft need to examine your system before displaying update files?





24. list 2 ways to access device manager.





25. what tab in the properties dialog box do u use to update a driver?





26. why might u want to use an old driver?





27. which control panel applet do u use to enable password protection for a screen saver in windows 98?





28. in windows 98 which controll panel applet is used to install new windows comonents?





29.


what catagory of components is desktop wallpaper part of in windows 98?





30. when formating a disk, what command can u use to make a floppy disk a boot disk?





31. if u have a flopy disk what other command can u use to transfer system files to the floppy disk?





32. list five things you should check before starting the instalation or upgrade process of the operating system?





33. how can u find out if your video card will work with windows 2000?





34. what step is critical in upgrading to ensure you dont lose important data during instalation?





35. what step can u take to speed up the actual instalation process?





36. what directory in windows 2000 contains the files needed to set up windows 2000 support tools?





37. what windows 2000 support toolv offers information about all other support tools?





38. explain how to compile a list of devices installed on your system in windows XP?





39. how are devices grouped in device manager in windows XP?





40. what is HCL?|||WOW! You have 40 questions for a test, and you want us to answer every single last one for you?





Asking someone else to do your work for you is NOT a %26quot;resource%26quot;. A resource might be a %26quot;google%26quot; search or a dictionary, or a reference manual. But asking other people to do your work FOR you is NOT a resource! That%26#039;s called %26quot;CHEATING!%26quot;|||We%26#039;re not going to do your work for you. You%26#039;ll never learn anything that way..

I'm unable to log into Windows XP after certain Viruses/Trojans infected my computer. Please help!?

A couple of windows popped up and installed SMSS32.EXE, HELPER32.EXE, 41.EXE %26amp; IS15.EXE into my system32 directory. They blocked the task manager from opening, displayed a red circle with an X in it next to the Windows clock and changed the desktop to green with a virus alert of sorts written in the center. I went into MSCONFIG and found SMSS32.EXE in the startup list and disabled it. Then I went to restart Windows and while usually Windows does not display a logon screen, since there%26#039;s only one account, it did display one this time. I clicked on the account to log on. It sais %26quot;loading settings%26quot; but then, instead of going to Windows, the screen refreshed and it then said %26quot;saving settings%26quot; as though I just logged out again. So I%26#039;m guessing whatever malware I have is blocking logons.





Well, I ran Recovery Console from XP CD, went to the command prompt and deleted all the files listen above from the system32 directory. I had hoped that as a result I%26#039;d be able to log in and fix my computer with the info I found online (from a different computer). But I still can%26#039;t get past the logon screen.





How can I get into Windows to fix things? I don%26#039;t know how you can bypass the logon screen. I tried going through SafeMode. Help! lol





Thanks! :)|||run your windows xp disc over the xp operating system but do not do a format ! or you will loose all your files/data


or try to fix your boot options by typing C:\FIXBOOT in dos prompt if you choose repair option in windows recovery


after you recover everything you need do a format|||Your going to have to reboot the system!





but before you do this go into a store that fixes computers and ask them about it!!! they will help you out.!

Unix&Liunx) .cshrc?

How can I set up the %26#039;.cshrc%26#039; as below ?


When I set that up , Could you please show me the result ?





D. Create a duplicate of your current %26quot;.cshrc%26quot; file; Open 2nd connection to SJU48; edit %26quot;.cshrc%26quot; with VI:





i. Clean up unwanted and obsoleted entries such as lpath, extra aliasesand comment-out lines





ii. Correct environment variables as appropriate, in particular, PATH, MANPATH, most importatnt function keys


such as ERASE, INTERRUPT, STOP, SUSPEND, EOF and KILL; creat your favoriate aliases; add variable


such as tabs, umask, filec, tty, noclobber, and history et al. set your prompt so it will display (minimum the following)


your login-name, hostname (system name) and current working directory.





iii. Save your changes; execute command %26quot;source ~/.cshrc%26quot; or equivalentin other shell to configure the file


iv. if no error after execution, you are ok; otherwise, repeate steps ithrough iii until no errorv.


customize your .bash_profile in a way similar to above for .cshrc|||Example here


http://web.bilkent.edu.tr/Online/unixman鈥?/a>

Big problem with UXtheme.dll?

Hi, I wanted to change my vista theme to a different one, so I followed the guide on win matrix. After I had the patched file in the correct directory, I rebooted, but when I start up and log in again, I just see a black screen and my cursor. Explorer.exe doesn%26#039;t work (at all), and ive tried taking control of the file (with cmd.exe), but when I try to rename it or delete it (still using cmd.exe) It says access denied. All I can open so far is: Task manager(only about 4 processes running), Command prompt, and the %26#039;choose a program to open this file%26#039; box when I tried to open uxtheme.old with cmd. Thanks.





Note: If anyone could tell me how i can get to control panel that would be great too. |||get an unpatched copy of uxtheme.dll, (download it, use google, or get a friend to email it to you) whack it on a usb, boot to safe mode, then overwrite the patched file.





BTW, this is the correct thread for patching vista


http://www.winmatrix.com/forums/index.ph鈥?/a>