Results 1 to 3 of 3
Hey
is there a way to make use of the results from the find command?
ex.
[ root@root files]#find . -name "test*" -mtime -1
./test1.txt
./text5.txt
how do i move ...
- 02-14-2008 #1Just Joined!
- Join Date
- Feb 2008
- Posts
- 27
Move files from find command
Hey
is there a way to make use of the results from the find command?
ex.
[ root@root files]#find . -name "test*" -mtime -1
./test1.txt
./text5.txt
how do i move the results to other directories? i know can do by bash script, but is there another way to do it?
thanks in advance
- 02-14-2008 #2
I suggest you look into the "-exec" option for find. A quick example:
This would move every file found into backup_dir/.Code:find . -name '*.bak' -exec mv '{}' backup_dir/ \;DISTRO=Arch
Registered Linux User #388732
- 02-14-2008 #3


Reply With Quote
