LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 02-18-2007, 11:31 AM   #1
ramesh_manu
LQ Newbie
 
Registered: Dec 2006
Location: chennai, India
Distribution: redhat & mandriva
Posts: 17

Rep: Reputation: 0
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 ) ?
 
Old 02-18-2007, 11:43 AM   #2
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
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.
 
Old 02-18-2007, 01:46 PM   #3
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 18, 19, RHL 5.2
Posts: 546

Rep: Reputation: 43
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
extract files from subdirectories to another dir hamboy Linux - Newbie 1 09-15-2006 09:00 AM
ls question: how to avoid listing contents of subdirectories learnfast Linux - Newbie 2 03-09-2005 08:59 AM
Unzipping all .gz files in all subdirectories darin3200 Linux - General 10 04-24-2004 09:58 PM
delete files / keep subdirectories? lhorstman Linux - Newbie 2 01-10-2003 03:01 PM
Script For Moving Files In Subdirectories darkmage Linux - General 3 12-17-2002 06:34 PM


All times are GMT -5. The time now is 05:13 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration