Thread: Command to copy files in subfolders to one folder
okay have bunch of images set this:
- images
-- folder 1
-- folder 2
-- folder 3
... etc
in each folder there tonne of images. want able copy images in each folder folder called "all" can activate slideshow using gthumb images, instead of 1 folder.
open each folder manually , copy everything, paste "all" folder, repeat. time consuming, , there must command line way![]()
that parent directory, 1 want images in.code:cd images
this assumes images end .jpg file extention.code:find ./ -name '*.jpg' -exec cp '{}' ./ \;
if there images in sudirectories, have different file extensions .png .jpg .jpg .jpeg etc then
do not in home directory or have right mess on hands
|
|
|
v
move file in subdirectories 1 you`re in.code:find ./ -type f -exec cp '{}' ./ \;
can rename parent folder "all"
alternatively use feh create slideshow.
thencode:sudo apt-get install fehthis create slideshow. f fullscreen, z random, r tells feh go through directories recursively , d specifies time each picture displayed before changing next one. time in seconds example delay pictures 5 seconds.code:feh -fzr -d 5 ~/images
known making typos, test code first.
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support New to Ubuntu [ubuntu] Command to copy files in subfolders to one folder
Ubuntu
Comments
Post a Comment