New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Quick noob question #1
Hey guys,
The situation is, I got a lot of folders containing one .avi file and I need all .avi files in 1 directory instead of all seperate.
I have no clue how to do this quickly with the command line but I'm sure 90% of the people here do know.
Thanks in advance.
Comments
mmm,, so do you want to copy/move all .avi file into one folder?
maybe this can help you. http://content.hccfl.edu/pollock/Unix/FindCmd.htm
@ztec Google is your friend
The command you should be looking for would be something like:
This would start new mv process for every file.
With many files xargs could be faster.
find ./ -type f -iname "*.avi" -print0 | xargs -0 -I '{}' mv '{}' /some/newdir
Thanks a lot guys.
Anyway to delete everything under 50MB?
http://www.go2linux.org/usages-examples-of-find-command
7 is the one you want.
Now if you divide each file size by 1024 (1k) you will see that the first output is always lower than 4096 (4k) and upper 3072 (3k), on the second output you have it between 4096 (4k) and 5120 (5k).
How would I get it to find everything under 50mb?
Sorry in advance, I usually hire ppl to do these type of things.
Finding files with less than 50MB