LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   listing subdirectories files (http://www.linuxquestions.org/questions/red-hat-31/listing-subdirectories-files-530164/)

ramesh_manu 02-18-2007 11:31 AM

listing subdirectories files
 
I want to list the files in currect directory and subdirectories. What option used in ls command ?


What option is used to copy a files with prompt option ( copy or reject ) ?

reddazz 02-18-2007 11:43 AM

If you need to find out how to use commands and what their switches do, read their manual pages e.g "man ls". To recursively list directories and their subdirectories, do
Code:

$ls -lR /some/dir
As for copying without prompting, you may have to tinker with the alias for cp thats probably set in your ~/.bashrc or /etc/bashrc.

wmakowski 02-18-2007 01:46 PM

cp -i will prompt you only if there is another file with the same name present in the location you are copying to. AFAIK if you want to prompt for each file being copied you would need to write a short script. A for loop with printf, read, an if statement and cp should do the trick.

Bill


All times are GMT -5. The time now is 07:58 AM.