Question about Operating Systems

1 Answer

Linux scripting I would like to know how to do a batch script for this please: Find all files within the /home folder {including sub- folders), delonging to a user that are not in that user's home folder. The chosen user's name is to be prompted and entered from the keyboard. The user's home folder can be retrieved from the /etc/passwd file. This is to be from the root user. can you help me?? thanks katrena

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.


    An expert who has answered 20 questions.


    An expert that hasĀ over 10 points.


    An expert whose answer gotĀ voted for 2 times.

  • Contributor
  • 47 Answers
Re: linux scripting

Have you tried this link:

Posted on Oct 09, 2007

Add Your Answer

0 characters

Uploading: 0%


Complete. Click "Add" to insert your video. Add


3 Points

Related Questions:

2 Answers

Fix my vb script engine on my computer / Windows 7

Fix Windows Script Host If you are experiencing script host issues, you might notice error messages such as "Library not registered." Script host issues occur when scripting components do not exist in the Windows registry, according to Microsoft. Your version of Windows determines how the missing scripting components affect your system. You can repair script host problems by using your PC's native features.
Press the "Windows" key. Type "cmd" in the dialog box and press "Enter." This will open the Command Prompt. Type the following commands at the prompt one at a time and press "Enter:" regsvr32 %systemroot%\system32\vbscript.dll regsvr32 %systemroot%\system32\jscript.dll regsvr32 %systemroot%\system32\dispex.dll regsvr32 %systemroot%\system32\scrobj.dll regsvr32 %systemroot%\system32\scrrun.dll regsvr32 %systemroot%\system32\wshext.dll regsvr32 %systemroot%\system32\wshom.ocx Exit the Command Prompt. b> Register Components on 64-bit Systems b> Press the "Windows" key. Type "cmd" in the dialog box and press "Enter." This will open the Command Prompt. Type the following commands at the prompt one at a time and press "Enter:" %systemroot%\system32\regsvr32 %systemroot%\system32\vbscript.dll %systemroot%\system32\regsvr32 %systemroot%\system32\jscript.dll %systemroot%\system32\regsvr32 %systemroot%\system32\dispex.dll %systemroot%\system32\regsvr32 %systemroot%\system32\scrobj.dll %systemroot%\system32\regsvr32 %systemroot%\system32\scrrun.dll %systemroot%\system32\regsvr32 %systemroot%\system32\wshext.dll %systemroot%\system32\regsvr32 %systemroot%\system32\wshom.ocx Exit the Command Prompt.
Enable Windows Script Host b> Windows Script Host is an administration tool by Microsoft that creates an environment for hosting scripts. According to Microsoft, Script Host will manage security and invoke the proper script engine. Script Host comes standard on all Windows operating system versions 98 and later. Therefore, you can easily enable Script Host on your computer. Go to the Windows Desktop. Click on the "Start" button. Select "Run" from the menu of options and icons that opens. Type the word "regedit" into the text box of the Run window and then click "OK." The Registry Editor window will appear. Select "HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings" from the folders on the left of the Registry Editor window. Double click on "Enabled" in the window pane to the right. Set the Value to 1. Return to the folders list in the Registry Editor. Select the folder "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Script Host\Settings." Again double click on "Enabled" in the window pane to the right and set the value to 1. That's it, you have successfully enabled Windows Script Host.

Jan 15, 2013 | Microsoft Windows 7 Home Premium 64BIT...


How to Encode your VBS and JS files for secure website uploading

If you are still at Service Pack 2 then you can use Microsoft's own Script Encoder download it from HERE it's a command line version so after you have installed it you need to run the command prompt also make sure the Windows Scripting Host is started.


For both Visual Basic Scripts and JavaScript you will need to format the text in your script to look like this;


Replace your code goes here with your actual code when the encoder has been run then you will see that the <SCRIPT LANGUAGE= ********> will have changed to <SCRIPT LANGUAGE= ********.encode> and your code will be random characters.

The Syntax for the encoder from the command prompt is;


Recognized file extensions are .js and .vbs, which are changed to .jse and .vbe, respectively, after encoding, also these type of files can be decoded if you know what you are doing and therefore not totally hacker proof.

IF YOU HAVE SERVICE PACK 3 installed then this won't work at all so the best method is to use this VBS2EXE this is also a command prompt program you must make sure that the script that you want to convert is in the same root folder.


When finished there will be a new file about 10 times larger then the script with the EXE file extension if you try to edit it all the code appears random this is the best method for encoding your scripts

If you want to do it ALL online and feel secure then you can do both VBS (VIsual Basic Script) and (JS) JavaScript using this website below but it is limited to 10kb per file

If you create alot of batch files then I suggest that you also check out their BAT2EXE v1.5 this will convert CMD or BAT files into EXE files for web distribution you can also password protect and add a decompiler if required


on May 30, 2010 | Microsoft Windows XP Professional SP2

2 Answers

Can anyone explain how batch file works?

This is kind of tricky not knowing how familiar you are with the commandline, but a batch file simply contains single commands and executes them in order (usually from top to bottom). A batch file (or bash script in Linux) can be very helpful if you have to run certain commands over and over again, so you don't have to write them by hand.

An Example: You want to store your network settings in a text file.
You open the command prompt (WIN+R) and type this line:
mkdir C:\Network
Then you type this line:
ipconfig /all > C:\Network\ipconfig.txt
The first line creates a folder on your C: drive called "Network"
The second line runs the ipconfig command and saves it as a text file in that new folder.

To make a batch file, you open Notepad and insert the two lines. Then save it as "IP.bat" (make sure not to save it as "IP.bat.txt"! This is the most common mistake. If you save a file from Notepad, select "All Files" in the "Save As Type" dialog. Otherwise it will save it as a .txt file and you have to rename it later.)

Now you can double click the batch file and it runs all commands in the file.

You can also see the danger. If you run a batch file and don't know what it really does, it can destroy your whole system. So make sure you understand it and/or get it from a trustworthy source.

A nice example of how complex a batch file can be is here:

Copy the content into a text file, save it as AllHelp.bat, run it and it will create a webpage with all available DOS commands.

Hope this helps - otherwise let me know if you have specific questions.

Feb 26, 2012 | HEWLETT-PACKARD Operating Systems

2 Answers

Whenever i started windows it shows a warning message as can not find script file "c:\WINDOWS\system32\Rahul'sVirusprotection.vbe" how can i solve this problem? Is it a virus?

Follow below steps:
1. Click on Any folder.
2. Click Tools - Folder Options - View - Hidden Files & Folders
3. Mark Show hidden files and folders
4. Unmark Hide extensions of Known file types
5. Unmark Hide protected Operating system files (Recommended)
6. First two files were seen on my flash drive : Rahul'svirusprotection.vbe & autorun.inf
7. Click on the properties of both file and unmarked Read only.
8. Clicked Apply & deleted both files.
9. Searched for Rahul*.* on hard drives.
10. Click on the properties file and unmarked Read only deleted the file.
11. Now LORD RAHUL COOL is out of my browser.

Or try this:

If the error message is
"Cannot find script file C:\Windows\System32\Rahul'svirusprotection.vbe".
Create a new notepad document and open it, Don't type any thing in it, leave it empty and save it as "Rahul'svirusprotection.vbe".Then place this script file in "C:\Windows\System32\" and restart your PC, your error will be gone...

Oct 20, 2010 | Operating Systems

2 Answers

Batch convert image files, that keeps a folder tree?

If your not using version 2.20 then upgrade because there is no limit according to the manufacturer.

Dec 14, 2009 | Microsoft Windows XP Home Edition

1 Answer

My computer is not creating Restore Points... yes it's turned on... yes I know how to do a manual... but it disappears when the next Restore Point is created... can you help?

Creating a System Restore point using a shortcut For a more elegant way to create a System Restore point using Script in Windows Vista, check out our article Create System Restore Points Quickly using Script in Windows Vista and Windows XP.
Alternately, you may use the method below:
Copy the contents below to a Notepad document, and save it to a file name with .vbs extension (Example: createrp.vbs) and close Notepad.
set SRP = getobject("winmgmts:\\.\root\default:Systemrestore")
CSRP = SRP.createrestorepoint ("Created a Restore Point now", 0, 100)
If CSRP <> 0 then
Msgbox "Error " & CSRP & ": Unable to create System Restore point"
End if
Right-click on the Desktop and select New - Shortcut
Create a shortcut with the following target:
wscript.exe c:\scripts\createrp.vbs
Note: The above assumes that the createrp.vbs script is present in the c:\scripts folder. If that's not the case, change the Path accordingly.
Name the shortcut file name as Create Restore Point
Running the script To create a System Restore point, run the script with elevated mode. To do so, right-click on the newly created shortcut (Create Restore Point.lnk) and choose Run as administrator. When you are prompted for an administrator password or confirmation, type the password or provide confirmation. A System Restore point will automatically be created.

Nov 23, 2009 | Microsoft Windows Vista Home Premium with...

1 Answer

String Manipulation in Batch Script

/* REXX is better than Batch Scripting -- see */
filename = ''
char = '_'
parse var filename part1 (char) part2
first4 = left(part2,4)
say 'First 4 characters are:' first4

Aug 07, 2008 | Operating Systems

1 Answer

Need help batch script #!/bash/sh

google batch script programming to get tutioral and other info on batch scripting

all the batch needs to do id change its directory to the directory you want and then just use other commands to do what you want with the files

cd Documents and settings
cd user
cd temp
del *.*

Sep 23, 2007 | Operating Systems

1 Answer

Lunix scripting

Assuming you have ALLCORES directory: su - root find /tmp -type f -name core -exec mv {} ~/ALLCORES \;

Sep 22, 2007 | Operating Systems

7 Answers

XP Themes

i wanna full version themes for my desktops

Aug 24, 2007 | Microsoft Windows XP Professional With...

Not finding what you are looking for?
Operating Systems Logo

Related Topics:

103 people viewed this question

Ask a Question

Usually answered in minutes!

Top Operating Systems Experts


Level 3 Expert

18259 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Martin Murray

Level 3 Expert

1614 Answers

Are you an Operating System Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides