Sponsored Content
Full Discussion: Deleting all but JPG files
Top Forums UNIX for Dummies Questions & Answers Deleting all but JPG files Post 302434482 by Xterra on Friday 2nd of July 2010 06:29:55 PM
Old 07-02-2010
bartus11

Thank you very much! However, the code does not work if the file name contains spaces like this
Quote:
1 - Copy.jpg
1 Copy.jpg
And this is the message I get
Code:
rm: cannot remove `-': No such file or directory
rm: cannot remove `Copy.fas': No such file or directory
rm: cannot remove `./1': No such file or directory
rm: cannot remove `Copy.fas': No such file or directory

It will also delete files that are named as number with no file extension.
Thanks for your help!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Deleting old files

Hi, I have a directory which contains files.This Directory keeps getting in new files from time to time.I want to maintain only 15 files in that directory at any time and the old files should be deleted. Eg: Directory 'c' @'a/b/c contains: 1_a 2_a 3_a... I want to delete all the old... (2 Replies)
Discussion started by: shiroh_1982
2 Replies

2. UNIX for Dummies Questions & Answers

df -k and deleting files

hi everybody, urgently need solutioin aftet i execute the command df -k, i get to see al the memory status blah blah if some file system has 95% full then what should i do and any help on how and what to do ? help really appriciated. cheers (4 Replies)
Discussion started by: ajayr111
4 Replies

3. UNIX for Dummies Questions & Answers

Delete files Recursively *thumbs*.jpg

Greetings, I need to delete all files that contain the word thumbs. Those files are spread all throughout sub-directories in a file directory tree. Is there a script or single line command that will find all files with the word thumbs, and simply delete the file? For example: Delete... (4 Replies)
Discussion started by: ..Chris..
4 Replies

4. Shell Programming and Scripting

Rename all ".JPG" files to ".jpg" under all subfolders...

Hi, Dear all: One question ! ^_^ I'm using bash under Ubuntu 9.10. My question is not to rename all ".JPG" files to ".jpg" in a single folder, but to rename all ".JPG" files to ".jpg" in all subfolders. To rename all ".JPG" to ".jpg" in a single folder, for x in *.JPG; do mv "$x"... (7 Replies)
Discussion started by: jiapei100
7 Replies

5. Shell Programming and Scripting

Need help comparing two files and deleting some things in those files!

So I have two files: File1 pictures.txt 1.1 1.3 dance.txt 1.2 1.4 treehouse.txt 1.3 1.5 File2 pictures.txt 1.5 ref2313 1.4 ref2345 1.3 ref5432 1.2 ref4244 dance.txt 1.6 ref2342 1.5 ref2352 1.4 ref0695 1.3 ref5738 1.2 ref4948 1.1 treehouse.txt 1.6 ref8573 1.5 ref3284 1.4 ref5838... (24 Replies)
Discussion started by: linuxkid
24 Replies

6. UNIX for Dummies Questions & Answers

deleting files

:confused: hi all, I need to delete all the files from a archieve directory whose filename starts with 2008, 2009. The folder consists of 2008, 2009, 2010 and 2011. the filename example is as below: 20081111_12_asc_ac_st.zip similarly there are files for 2009. There are around... (2 Replies)
Discussion started by: abhi_123
2 Replies

7. Shell Programming and Scripting

AIX system.... deleting files in remote directory after retrieving files

Hi Friends, I am new to this , I am working on AIX system and my scenario is to retrive the files from remote system and remove the files from the remote system after retreving files. I can able to retrieve the files but Can't remove files in remote system. Please check my code and help me out... (3 Replies)
Discussion started by: vinayparakala
3 Replies

8. Shell Programming and Scripting

Deleting files

Hi all, I have developed a shell script to copy the files from source to destination and simultaneously to delete the copied files in source. I can copy the files but the files cannot be deleted in source side. (3 Replies)
Discussion started by: Venkatesan
3 Replies

9. Shell Programming and Scripting

copying random Jpg files to different folder

Hi, I have 200 pictures in a folder and I would like move 10 random pictures every week to given folder automatically. I have this server on 1and1.com. So I tried the following using Bash script for manual copy and paste for testing #!/bin/bash mapfile -t -n 3 files < <(find... (13 Replies)
Discussion started by: raamkum
13 Replies

10. Shell Programming and Scripting

Bash script deleting my files, and editing files in subdirectories question

#!/bin/bash # name=$1 type=$2 number=1 for file in ./** do if then filenumber=00$number elif then filenumber=0$number fi tempname="$name""$filenumber"."$type" if (4 Replies)
Discussion started by: TheGreatGizmo
4 Replies
GD_INFO(3)								 1								GD_INFO(3)

gd_info - Retrieve information about the currently installed GD library

SYNOPSIS
array gd_info (void ) DESCRIPTION
Gets information about the version and capabilities of the installed GD library. RETURN VALUES
Returns an associative array. Elements of array returned by gd_info(3) +-------------------+---------------------------------------------------+ | Attribute | | | | | | | Meaning | | | | +-------------------+---------------------------------------------------+ | GD Version | | | | | | | | | | string value describing the installed libgd ver- | | | sion. | | | | | FreeType Support | | | | | | | | | | boolean value. TRUE if FreeType Support is | | | installed. | | | | | FreeType Linkage | | | | | | | | | | string value describing the way in which FreeType | | | was linked. Expected values are: 'with freetype', | | | 'with TTF library', and 'with unknown library'. | | | This element will only be defined if FreeType | | | Support evaluated to TRUE. | | | | | T1Lib Support | | | | | | | | | | boolean value. TRUE if T1Lib support is | | | included. | | | | | GIF Read Support | | | | | | | | | | boolean value. TRUE if support for reading GIF | | | images is included. | | | | |GIF Create Support | | | | | | | | | | boolean value. TRUE if support for creating GIF | | | images is included. | | | | | JPEG Support | | | | | | | | | | boolean value. TRUE if JPEG support is included. | | | | | PNG Support | | | | | | | | | | boolean value. TRUE if PNG support is included. | | | | | WBMP Support | | | | | | | | | | boolean value. TRUE if WBMP support is included. | | | | | XBM Support | | | | | | | | | | boolean value. TRUE if XBM support is included. | | | | | WebP Support | | | | | | | | | | boolean value. TRUE if WebP support is included. | | | | +-------------------+---------------------------------------------------+ Note Previous to PHP 5.3.0, the JPEG Support attribute was named JPG Support. EXAMPLES
Example #1 Using gd_info(3) <?php var_dump(gd_info()); ?> The above example will output something similar to: array(9) { ["GD Version"]=> string(24) "bundled (2.0 compatible)" ["FreeType Support"]=> bool(false) ["T1Lib Support"]=> bool(false) ["GIF Read Support"]=> bool(true) ["GIF Create Support"]=> bool(false) ["JPEG Support"]=> bool(false) ["PNG Support"]=> bool(true) ["WBMP Support"]=> bool(true) ["XBM Support"]=> bool(false) } CHANGELOG
+--------+------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+------------------------------------------------+ | 5.5.0 | | | | | | | | | | WebP Support added. | | | | | 5.3.0 | | | | | | | | | | JPG Support attribute renamed to JPEG Support. | | | | +--------+------------------------------------------------+ SEE ALSO
imagepng(3), imagejpeg(3), imagegif(3), imagewbmp(3), imagetypes(3). PHP Documentation Group GD_INFO(3)
All times are GMT -4. The time now is 03:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy