LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-18-2003, 10:41 PM   #1
selfsck
LQ Newbie
 
Registered: Dec 2003
Distribution: FreeBSD / Redhat
Posts: 9

Rep: Reputation: 0
file replacement


im trying to find and replace *.Gif files, would sed do the trix ?
lookin for a single command line ton find all of em, then replace with another gif.

Anyone ?
 
Old 12-18-2003, 10:49 PM   #2
selfsck
LQ Newbie
 
Registered: Dec 2003
Distribution: FreeBSD / Redhat
Posts: 9

Original Poster
Rep: Reputation: 0
under RH9.0 2.4 i386
 
Old 12-19-2003, 12:25 AM   #3
miaviator278
Member
 
Registered: Dec 2003
Location: Al-Diwania, Iraq (deployed)
Distribution: Slackware ONLY
Posts: 237

Rep: Reputation: 30
so let me get this straight, you want to find every .gif on your system and replace them all with one gif? i know i read that wrong..

anyway, if you have slocate installed it may help, man locate, man slocate
otherwise sed and awk should do it, with some man page reading,

but please describe what you want to do in a little more detail..
 
Old 12-19-2003, 07:06 AM   #4
eddacker
LQ Newbie
 
Registered: Nov 2003
Location: Derbyshire, UK
Distribution: Debian Testing
Posts: 14

Rep: Reputation: 0
find / -type -d afile.gif exec mv another.giv afile.gif {} \;

find files named afile.gif (not directories) and execute mv on each one with another.gif
that's as close as I can get from memory.
 
Old 12-19-2003, 08:56 AM   #5
selfsck
LQ Newbie
 
Registered: Dec 2003
Distribution: FreeBSD / Redhat
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks eddacker, thats what i was looking for
saved me time
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
putty replacement Yomaoni Linux - Software 5 07-26-2005 12:28 PM
replacement for x sneak General 2 07-05-2004 08:10 AM
/dev/floppy file replacement queuecumber Linux - General 2 02-10-2004 06:35 PM
buged file & replacement lynxgogo Linux - Software 1 08-23-2003 07:26 AM
o/s replacement... GT I.N.C Linux - General 7 07-06-2002 08:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration