-   Red Hat (
-   -   listing subdirectories files (

ramesh_manu 02-18-2007 12:31 PM

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 12:43 PM

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

$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 02: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.


All times are GMT -5. The time now is 04:11 AM.