Home  |  Forums  |  914 Info  |  Blogs
 
914World.com - The fastest growing online 914 community!
 
Porsche, and the Porsche crest are registered trademarks of Dr. Ing. h.c. F. Porsche AG. This site is not affiliated with Porsche in any way.
Its only purpose is to provide an online forum for car enthusiasts. All other trademarks are property of their respective owners.
 

Welcome Guest ( Log In | Register )

2 Pages V < 1 2  
Reply to this topicStart new topic
> renaming mass file extensions (HELP), in Debian Linux
Root_Werks
post Apr 7 2005, 01:33 PM
Post #21


Village Idiot
*****

Group: Members
Posts: 8,314
Joined: 25-May 04
From: About 5NM from Canada
Member No.: 2,105
Region Association: Pacific Northwest



Whew! Well, since everything is in a temp file, I would try something like this from the directory in which your files reside:

mv -i *.php /home/temp/new_files/*.php3

Then you can:

ls -l /home/temp/new_files/* > /home/temp/new_files/list.txt

ls -l > list1.txt

Compare the two list files to make sure nothing is missing. (IMG:http://www.914world.com/bbs2/html/emoticons/wink.gif)
User is online!Profile CardPM
Go to the top of the page
+Quote Post
bd1308
post Apr 7 2005, 01:39 PM
Post #22


Sir Post-a-lot
*****

Group: Members
Posts: 8,020
Joined: 24-January 05
From: Louisville,KY
Member No.: 3,501



okay....did apt-get install php4 to get php4....figured it didnt work with php3 so i migth as well upgrade..done
dumped entire /phpBB2 to /trash....can't figure out how to delete whole non-empty dir's tho.
next i'm going to print out my httpd.conf file and look through that to see if i left traces of php3 in there....
files are now needing to be named .php, but i was trying everything to see if any combo worked.
nothing works rigth now, seems as if .php isnt recignized as an actual executable file to apache...but i dont see a module to load in httpd.conf
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
tat2dphreak
post Apr 7 2005, 01:43 PM
Post #23


stoya, stoya, stoya
*****

Group: Benefactors
Posts: 8,797
Joined: 6-June 03
From: Wylie, TX
Member No.: 792
Region Association: Southwest Region



QUOTE (Root_Werks @ Apr 7 2005, 02:33 PM)
Whew! Well, since everything is in a temp file, I would try something like this from the directory in which your files reside:

mv -i *.php /home/temp/new_files/*.php3

Then you can:

ls -l /home/temp/new_files/* > /home/temp/new_files/list.txt

ls -l > list1.txt

Compare the two list files to make sure nothing is missing. (IMG:http://www.914world.com/bbs2/html/emoticons/wink.gif)

I don't think that mv will work the way you used it... if so, it doesn't work for me under HP UNIX.. I just set up a test to try it, using a copy of my sql directory and a temp dir under it...

razor:MED:/home/wf6341/temp_sql-> mkdir test
razor:MED:/home/wf6341/temp_sql-> mv -i *.sql ./temp/*.sq1
Usage: mv [-f] [-i] [-e warn|force|ignore] f1 f2
mv [-f] [-i] [-e warn|force|ignore] f1 ... fn d1
mv [-f] [-i] [-e warn|force|ignore] d1 d2
razor:MED:/home/wf6341/temp_sql->
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
tat2dphreak
post Apr 7 2005, 01:44 PM
Post #24


stoya, stoya, stoya
*****

Group: Benefactors
Posts: 8,797
Joined: 6-June 03
From: Wylie, TX
Member No.: 792
Region Association: Southwest Region



QUOTE (bd1308 @ Apr 7 2005, 02:39 PM)
okay....did apt-get install php4 to get php4....figured it didnt work with php3 so i migth as well upgrade..done
dumped entire /phpBB2 to /trash....can't figure out how to delete whole non-empty dir's tho.
next i'm going to print out my httpd.conf file and look through that to see if i left traces of php3 in there....
files are now needing to be named .php, but i was trying everything to see if any combo worked.
nothing works rigth now, seems as if .php isnt recignized as an actual executable file to apache...but i dont see a module to load in httpd.conf

to delete whole non-empty directories... "rm -rf directory_name"

be careful though...
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Root_Werks
post Apr 7 2005, 01:50 PM
Post #25


Village Idiot
*****

Group: Members
Posts: 8,314
Joined: 25-May 04
From: About 5NM from Canada
Member No.: 2,105
Region Association: Pacific Northwest



QUOTE (tat2dphreak @ Apr 7 2005, 11:43 AM)
QUOTE (Root_Werks @ Apr 7 2005, 02:33 PM)
Whew!  Well, since everything is in a temp file, I would try something like this from the directory in which your files reside:

mv -i *.php /home/temp/new_files/*.php3

Then you can:

ls -l /home/temp/new_files/* > /home/temp/new_files/list.txt

ls -l > list1.txt

Compare the two list files to make sure nothing is missing. (IMG:http://www.914world.com/bbs2/html/emoticons/wink.gif)

I don't think that mv will work the way you used it... if so, it doesn't work for me under HP UNIX.. I just set up a test to try it, using a copy of my sql directory and a temp dir under it...

razor:MED:/home/wf6341/temp_sql-> mkdir test
razor:MED:/home/wf6341/temp_sql-> mv -i *.sql ./temp/*.sq1
Usage: mv [-f] [-i] [-e warn|force|ignore] f1 f2
mv [-f] [-i] [-e warn|force|ignore] f1 ... fn d1
mv [-f] [-i] [-e warn|force|ignore] d1 d2
razor:MED:/home/wf6341/temp_sql->

I'm just going off of memory. I have a unix emulator on my PC here at work I use sometimes for perl stuff, but haven't done much with the ksh in a few years. Written hundreds of ksh scripts on HP-UX boxes though. Ah the memories. (IMG:http://www.914world.com/bbs2/html/emoticons/biggrin.gif)

I think my emulator is running bash, that could be the difference there.
User is online!Profile CardPM
Go to the top of the page
+Quote Post
Gint
post Apr 7 2005, 08:07 PM
Post #26


Mike Ginter
***************

Group: Admin
Posts: 16,066
Joined: 26-December 02
From: Denver CO.
Member No.: 20
Region Association: Rocky Mountains



This looks a lot like work!

From a bash shell command line (which is probably what you're running out of the box in Linux):

ls *.php | awk -F. '{print $1}'|while read file; do mv $file.php $file.php3; done
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Gint
post Apr 7 2005, 08:12 PM
Post #27


Mike Ginter
***************

Group: Admin
Posts: 16,066
Joined: 26-December 02
From: Denver CO.
Member No.: 20
Region Association: Rocky Mountains



QUOTE (bd1308 @ Apr 7 2005, 01:39 PM)
okay....did apt-get install php4 to get php4....figured it didnt work with php3 so i migth as well upgrade..done
dumped entire /phpBB2 to /trash....can't figure out how to delete whole non-empty dir's tho.
next i'm going to print out my httpd.conf file and look through that to see if i left traces of php3 in there....
files are now needing to be named .php, but i was trying everything to see if any combo worked.
nothing works rigth now, seems as if .php isnt recignized as an actual executable file to apache...but i dont see a module to load in httpd.conf

rmdir

or

rm -r "directory name"

But make sure you want to delete everying!

Dude, if you're gonna keep this up, you need to invest in some books and learn to love man pages.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
bd1308
post Apr 8 2005, 12:39 AM
Post #28


Sir Post-a-lot
*****

Group: Members
Posts: 8,020
Joined: 24-January 05
From: Louisville,KY
Member No.: 3,501



well i might just have to do that anyway, as i still don't feel confident in my php installation abilities.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Gint
post Apr 8 2005, 08:59 AM
Post #29


Mike Ginter
***************

Group: Admin
Posts: 16,066
Joined: 26-December 02
From: Denver CO.
Member No.: 20
Region Association: Rocky Mountains



QUOTE (bd1308 @ Apr 7 2005, 12:36 PM)
nevermind....it worked!!!!! yea! thank you all....now you all have to tell me hwo to learn all of this stuff

Just like everything else. Learn what you can from books. Then... Do it... try it... learn from your mistakes and build on the experience.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

2 Pages V < 1 2
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 3rd May 2024 - 10:12 AM