English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Need help batch script #!/bash/sh

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??

2007-10-24 23:27:00 · 2 answers · asked by Anonymous in Computers & Internet Software

2 answers

"ls" 'ls' `ls` if you already know the difference between all three type of quotes this is easily done even in a very inefficient code.

I assume you don't or else you wouldn't have asked: "" is unescaped string that's yet to be parsed for shell special keys, '' is escaped and taken literally, `` is redirecting stdout of the command in `` to the batch environment.

I'm not on a Linux machine at the moment so can't help further. ls have switches of full output, recursive, and batch output on top of that.

2007-10-24 23:39:45 · answer #1 · answered by Andy T 7 · 0 0

use commend prompt for that

2007-10-25 00:03:33 · answer #2 · answered by Misty_75 2 · 0 1

fedest.com, questions and answers