Find all images, append unique prefix to name and move to different directory
Hi,
I have a directory with Multiple subdirectories and 1000s of pictures (jpg) in each directory. The problem is that each directory has a 001.jpg in them. I want to append a unique name (the directory_name)would be fine. and then move them to one main backup directory once they have been renamed.
I used the find command below on a test dir but it blew away duplicate names. ---------- Post updated at 01:37 PM ---------- Previous update was at 12:38 PM ----------
found the solution...
[CODE]rename -v 's/(.*)\/(.*)/$1_$2/;' */*
renames all the files in each directory with the directoryname_filename then moves them to the parent folder.
Last edited by Franklin52; 03-12-2012 at 02:15 PM..
Reason: Please use code tags for data and code samples, thank you
Using a bash script, I need to find all files in a folder "except" the newest file. Then I need to insert the contents of one text file into all the files found. This text needs to be placed at the beginning of each file and needs a blank line between it and the current contents of the file. Then I... (5 Replies)
Hi,
I have a command "get_data" with some parameters in few *.text files of a directory. I want to first find those files that contain this command and then append the following parameter to the end of the command.
example of an entry in the file :-
get_data -x -m50 /etc/web/getid
this... (1 Reply)
Hello, I have a lot of mp3 in a various directory. My goal is a command that find all mp3 file and move the files and directory where is the mp3 file to a destination folder.
Is it possible?
Thanks in advance (7 Replies)
I have have 6 empty directory below. I would like write bash scipt if any files less "1000000000" bytes then move to "/export/home/mytmp/final" folder first and any files greater than "1000000000" bytes then move to final1, final2, final3, final4, final4, final5 and that depend see how many files,... (6 Replies)
Greetings. I know enough Unix to be dangerous (!) and know that there is a clever way to do the following and it will save me about a day of agony (this time) and I will use it forever after! (many days of agony saved in the future)!
Basically
I need to find any image files (JPGs, PSDs etc)... (5 Replies)
Ultimately, I'm looking to create a script that allows me to plug in a usb drive with lots of jpegs on it & copy them over to a folder on my hard drive. So in the process of copying I am looking to hash check them, record dupes to a file, copy only 1 of the identical files (if it doesn't exsist... (1 Reply)
I have this situation
/u03/app/banjobs> ls -ltr icg*
82 Jun 12 10:37 iicgorldi_2419186.log
56810484 Jun 17 10:35 icgorldi_2421592.xml
2859 Jun 17 10:35 icgorldi_2421592.lis
- 125 Jun 17 10:35 icgorldi_2421592.log
82 Jun 12 10:37 iicgorldi_2419187.log
... (8 Replies)
In the awk below I am trying to use the file1 as a match to file2. In file2 the contents of $5,&6,and $7 (always tab-delimited) and are copied to the output under the header Quality metrics. The below executes but the output is empty. I have added comments to help and show my thinking. Thank you... (0 Replies)
In the bash below in each .zip there is a folder to be extracted Variants that I am trying to make unique by adding the prefix, before the _ from the .zip. The script does execute, but the prefix is not added to the extracted folder. Rather the Variants folder is added to each file within it. Thank... (1 Reply)
I was using below script to grep one file. I need to append the output using prefix
Data of all-Vms-1.txt
server-1 frame-1 LUN001
server-2 frame-1 LUN002
Data of all-vm-unix.txt
server-1 24
server-2 50
Script used
while read -r g h ;
do
cat all-Vms-1.txt |grep... (5 Replies)
Discussion started by: ranjancom2000
5 Replies
LEARN ABOUT OPENSOLARIS
gthumb
gthumb(1)gthumb(1)NAME
gThumb - an image viewer and browser for GNOME
SYNOPSIS
gthumb [--help] [--version] [-f] [--fullscreen] [-s] [--slideshow] [--import-photos] [directory] [filename] ...
DESCRIPTION
With gThumb you can browse your hard disk viewing thumbnails of image files. It also lets you view single files (including GIF anima-
tions), add comments to images, organize images in catalogs, print images, view slideshows, set your desktop background, and more.
OPTIONS -f, --fullscreen
Start in fullscreen mode.
-s, --slideshow
Automatically start a slideshow.
--import-photos
Automatically import digital camera photos.
--help Output help information and exit.
--version
Output version information and exit.
Usual other GNOME options apply as well.
EXAMPLES
To run this program the standard way type:
gthumb
To view the content of a directory type:
gthumb /path/to/directory
To view all images with jpg extension type:
gthumb *.jpg
AUTHORS
Written by Paolo Bacchilega <paolo.bacch@tin.it>.
This manual page was originally written by Remco van de Meent <remco@debian.org>, for the Debian GNU/Linux system, now is maintained by
Paolo Bacchilega.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-------------------------------------+-----------------------------+
| ATTRIBUTE TYPE^ATTRIBUTE VALUE | |
+-------------------------------------+-----------------------------+
|Availability^SUNWgnome-img-organzier | |
+-------------------------------------+-----------------------------+
|Interface stability^Volatile | |
| | |
+-------------------------------------+-----------------------------+
GNOME Applications May 2002 gthumb(1)