Question about Computers & Internet

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

  • trenny Sep 23, 2007

    This didnt really help I need the script as in #!/bash/sh

×

Ad

1 Answer

  • Level 1:

    An expert who has achieved level 1.

    Hot-Shot:

    An expert who has answered 20 questions.

    Corporal:

    An expert that has over 10 points.

    Mayor:

    An expert whose answer got voted for 2 times.

  • Contributor
  • 47 Answers

Have you tried this link: www.linuxquestions.org

Posted on Oct 09, 2007

Ad

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi there,
Save hours of searching online or wasting money on unnecessary repairs by talking to a 6YA Expert who can help you resolve this issue over the phone in a minute or two.

Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.

Here's a link to this great service

Good luck!

Posted on Jan 02, 2017

Ad

Add Your Answer

Uploading: 0%

my-video-file.mp4

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

×

Loading...
Loading...

Related Questions:

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:
AllHelp.bat

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.
Enjoy!

Feb 26, 2012 | HEWLETT-PACKARD Computers & Internet

1 Answer

Script problems


It is most likely because you don't have scripts enabled. Try this first.

To enable scripting:

1. Click the "Tools" menu on your Internet Explorer toolbar and select "Internet Options."
2. Click the "Security" tab.
3. Click the Internet (globe) icon and click the "Custom Level" button.
4. Scroll down to "Scripting."
5. Enable the following:
* Active scripting
* Allow paste operations via script
* Scripting of Java applets are all enabled
6. Click the "OK" button at the bottom of the window.

If that doesn't work try this:

Why do I receive an error when running Yahoo! Messenger?

You might have a corrupt file in your Yahoo! Messenger directory. To fix the problem, you must manually delete the "Messenger" directory on your C: drive (default), then reinstall the Yahoo! Messenger application.

To delete the directory:

1. Close the Yahoo! Messenger application if you currently have it running. Make sure all instances of Internet Explorer are closed.
2. Go to your desktop and double-click "My Computer."
3. Click the "C:" drive.
4. Go to:
* C:\Program Files\Yahoo!
5. Highlight the Yahoo! Messenger folder and press the Delete key on your keyboard. (All archives will be deleted if they are not copied. Please see below.)

To install:

1. Close all running applications except for your Internet browser.
2. Visit the Yahoo! Messenger home page.
3. Click the "Download Now" button.

To copy your complete Message Archive:

1. Close Yahoo! Messenger (if it is currently running).
2. Go to your Desktop and double-click "My Computer."
3. Select the "C:" drive.
4. Go to:
* C:\Program Files\Yahoo!\Messenger\Profiles
5. Your "Profiles" folder contains your complete Message Archive. Copy it to the same location on another computer if you wish to view it elsewhere.

Note: If you copy this folder to another computer, your complete Message Archive will be copied, overriding the Message Archive on the computer to which you are copying.

Nov 14, 2010 | Yahoo Messenger

1 Answer

How to write script in 2003 domaincontroller


lease follow steps to resolve your issue

First, open "Active Directory Users and Computers" on the domain controller

Now right click on the user you want to have the logon script and select the properties menu.
A properties dialog like the one shown below will appear. Select the ‘Profile’ Tab

Here is the confusing part. If I just put any old batch file name in the logon script field, where does windows try to find it from?
Lets find out. First, type in this field ‘logon.bat’
Click OK.
Now, we need to find the folder where the server loads logon scripts. It follows this format:
\\(SERVERNAME)\sysvol\(DOMAIN NAME)\scripts
So, if my server was named DCServer1, and my domain was intelliadmin.com, we would browse to this path:
\\DCServer1\sysvol\intelliadmin.com\scripts

Now that we know where to put it, creating the script is easy. Just open up notepad, and write your batch file. For our test batch file we will put in a line that loads our profile generator for Microsoft Outlook XP

We are done with the script, so we save the text file as:
\\DCServer1\sysvol\intelliadmin.com\scripts\logon.bat
Now, the next time this user logs in, they will load the login script.
hope it can resolved your issue
thanks

May 14, 2010 | Computers & Internet

1 Answer

How to write script in 2003 domaincontroller


Hi

please follow steps to resolve your issue

First, open "Active Directory Users and Computers" on the domain controller

Now right click on the user you want to have the logon script and select the properties menu.
A properties dialog like the one shown below will appear. Select the ‘Profile’ Tab

Here is the confusing part. If I just put any old batch file name in the logon script field, where does windows try to find it from?
Lets find out. First, type in this field ‘logon.bat’
Click OK.
Now, we need to find the folder where the server loads logon scripts. It follows this format:
\\(SERVERNAME)\sysvol\(DOMAIN NAME)\scripts
So, if my server was named DCServer1, and my domain was intelliadmin.com, we would browse to this path:
\\DCServer1\sysvol\intelliadmin.com\scripts

Now that we know where to put it, creating the script is easy. Just open up notepad, and write your batch file. For our test batch file we will put in a line that loads our profile generator for Microsoft Outlook XP

We are done with the script, so we save the text file as:
\\DCServer1\sysvol\intelliadmin.com\scripts\logon.bat
Now, the next time this user logs in, they will load the login script.
Check out our Windows Admin Tools
Filed Under: Windows

hope it can resolved your issue
thanks for using fixya

Mar 25, 2010 | Computers & Internet

1 Answer

NO PERMISSION TO EDIT OR VIEW As an administrator, I thought I have all the privileges to edit, view read, modify, execute and write any folder, but on certain folders I must first grant myself the...


you need to Take ownership of those files...
For Files:

takeown /f file_name /d y
icacls file_name /grant administrators:F
For Folders or Directories (will perform action recursively):
takeown /f directory_name /r /d y
icacls directory_name /grant administrators:F /t
Replace file_name or directory_name with actual file name or folder name, with path when applicable. The first command will take ownership of the file or folder specified, and the second command will grant full control permissions to administrators user group. Note that when using command for folders, to command will run recursively. To prevent the task been perform recursively, remove the “/r” and “/t” switch.
Above two commands have been scripted in Windows command shell batch script that easily perform the task of taking ownership and grant full control permissions to Administrators user group by typing simple command. Alternatively, users can add “Take Control Of” option to right click menu so that the next time you need to take control of a file with full control permissions, it’s just a one click task.

Feb 04, 2010 | Acer Aspire™ T180 PC Desktop

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

3 Answers

How to set a folder with small program to run on linux+apache


Dear Rajiv

First make sure that your Apache server is running properly.
For this type http://localhost and see the result.

If you want to test PHP you can create a php test file by yourself.

Goto the www folder in apache director. create a file , name it anything.php. Edit the file and simply write "phpinfo()" without quotes . check the output.

It means that your apache server is fully capable of PHP scripting.

Cheers, Parveen

Jan 25, 2008 | Computers & Internet

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
e.g

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

Sep 23, 2007 | Computers & Internet

1 Answer

Lunix scripting


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

Sep 22, 2007 | Computers & Internet

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

108 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18425 Answers

Alun Cox

Level 3 Expert

2678 Answers

David Payne
David Payne

Level 3 Expert

14162 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...