1) I want to copy all the files from to another folder like :
cp arch00000096710001 to arch00000097330001 "to another folder" , not mentioning all files name
Use something like this:
Code:
cp * /home/username/newfolder
This will copy all files in the current directory to a directory called /home/username/newfolder.
2) I want to copy all the files date-wise , Like following way :
cp Sep 27 12:14 to Sep 27 15:34 "to another folder"
You'll have to do it relative to today's date. Here's one example:
Code:
find . -ctime -60 ! -ctime -30 -exec cp {} /home/username/newfolder \;
This should copy all files created in the last 60 days, but not ones created in the last 30 days (i.e. files created between 30 and 60 days ago).
3) I want to copy using llist file command Like ,
cp "ls -lrt"
Not exactly possible, since the first few columns of
ls -lrt's output will confuse the cp command. You can pipe the output of commands like ls to other commands like cp, but in such cases its not necessary, since
cp * or any other wildcards will work the same way they work for ls.