Sponsored Content
Top Forums Shell Programming and Scripting Copying List of Files Under Different File Names ?! Post 302547173 by dude2cool on Sunday 14th of August 2011 12:17:21 PM
Old 08-14-2011
modifying the above from birei to account for path:

$ for image in /home/sitename.com/www/photos/*.jpg; do cp "$image" "${image/new/old}"; done
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copying file names returned from a grep command into another directory

When I do the following : grep -l "string" *, I get a list of file names returned. Is there a way to copy the files returned from the list into another directory ?. Thanks. (4 Replies)
Discussion started by: Kartheg
4 Replies

2. UNIX for Dummies Questions & Answers

copying a pattern of files in one directory into other with new pattern names...

Hi, I have to copy a set of files abc* in /path/ to /path1/ as abc*_bkp. The list of files appear as follows in /path/: abc1 xyszd abc2 re2345 abcx .. . abcxyz I have to copy them (abc* files only) into /path1/ as: abc1_bkp abc2_bkp abcx_bkp .. . (6 Replies)
Discussion started by: new_learner
6 Replies

3. UNIX for Dummies Questions & Answers

Copying a list of files from one 'server' to another?

I have two servers. I would like to copy some files from one directory on server A into the same directory on server B. Its not all the files in in the directory, just some of them. Is there a way to make a file list in a txt file and then somehow copy all the files in that list in one go to... (6 Replies)
Discussion started by: Sepia
6 Replies

4. UNIX for Dummies Questions & Answers

copying same file multiple times with different names

hi, I am copying a file from 1 folder to another in /bin/sh. if the file already exists there, it should get copied as filename1. again if copying next time it shouldget copied as filename2.. , filename3..so on.. The problem is i am able to get uptil filename1.. but how do i know what... (6 Replies)
Discussion started by: blackcat
6 Replies

5. Shell Programming and Scripting

Grep string in files and list file names that contain the string

Hi, I have a list of zipped files. I want to grep for a string in all files and get a list of file names that contain the string. But without unzipping them before that, more like using something like gzcat. My OS is: SunOS test 5.10 Generic_142900-13 sun4u sparc SUNW,SPARC-Enterprise (8 Replies)
Discussion started by: apenkov
8 Replies

6. Shell Programming and Scripting

Inserting text in file names while copying them.

I'm trying to find a Bourne shell script that will copy files from one directory using a wild card for the file name (*) and add some more characters in the middle of the file name as it is copied. As an example: /u01/tmp-file1.xml => /u02/tmp-file1-20130620.xml /u01/tmp-file2.xml => ... (6 Replies)
Discussion started by: Tony Keller
6 Replies

7. Shell Programming and Scripting

Exclude certain file names while selectingData files coming in different names in a file name called

Data files coming in different names in a file name called process.txt. 1. shipments_yyyymmdd.gz 2 Order_yyyymmdd.gz 3. Invoice_yyyymmdd.gz 4. globalorder_yyyymmdd.gz The process needs to discard all the below files and only process two of the 4 file names available ... (1 Reply)
Discussion started by: dsravanam
1 Replies

8. Shell Programming and Scripting

While loop a file containing list of file names until the files are found?

Hi, I have a control file which will contain all filenames(300) files. Loop through all the file names in the control files and check the existence of this file in another directory(same server). I need to infinitely(2 hrs) run this while loop until all the files are found. Once a file is found,... (5 Replies)
Discussion started by: laknar
5 Replies

9. Shell Programming and Scripting

Finding a string in a list of files, print file names

I'm interested in writing a report script using BASH that searches all of the files in a particular directory for a keyword and printing a list of files containing this string... In fact this reporting script would have searches for multiple keywords, so I'm interested in making multiple... (2 Replies)
Discussion started by: chemscripter904
2 Replies

10. Shell Programming and Scripting

How to list files names and sizes in a directory and output result to the file?

Hi , I'm trying to list the files and output is written to a file. But when I execute the command , the output file is being listed. How to exclude it ? /tmp file1.txt file2.txt ls -ltr |grep -v '-' | awk print {$9, $5} > output.txt cat output.txt file1.txt file2.txt output.txt (8 Replies)
Discussion started by: etldeveloper
8 Replies
IMAGEROTATE(3)								 1							    IMAGEROTATE(3)

imagerotate - Rotate an image with a given angle

SYNOPSIS
resource imagerotate (resource $image, float $angle, int $bgd_color, [int $ignore_transparent]) DESCRIPTION
Rotates the $image image using the given $angle in degrees. The center of rotation is the center of the image, and the rotated image may have different dimensions than the original image. PARAMETERS
o $ image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3). o $angle - Rotation angle, in degrees. The rotation angle is interpreted as the number of degrees to rotate the image anticlockwise. o $bgd_color - Specifies the color of the uncovered zone after the rotation o $ignore_transparent - If set and non-zero, transparent colors are ignored (otherwise kept). RETURN VALUES
Returns an image resource for the rotated image, or FALSE on failure. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.5.0 | | | | | | | This function is now affected by the interpola- | | | tion method set by the imagesetinterpolation(3) | | | function. | | | | | 5.1.0 | | | | | | | $ignore_transparent was added. | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 Rotate an image 180 degrees This example rotates an image 180 degrees - upside down. <?php // File and rotation $filename = 'test.jpg'; $degrees = 180; // Content type header('Content-type: image/jpeg'); // Load $source = imagecreatefromjpeg($filename); // Rotate $rotate = imagerotate($source, $degrees, 0); // Output imagejpeg($rotate); // Free the memory imagedestroy($source); imagedestroy($rotate); ?> The above example will output something similar to:[NOT DISPLAYABLE MEDIA]Output of example : Rotate an image 180 degrees NOTES
Note This function is affected by the interpolation method set by imagesetinterpolation(3). SEE ALSO
imagesetinterpolation(3). PHP Documentation Group IMAGEROTATE(3)
All times are GMT -4. The time now is 02:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy