Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-09-2007, 06:33 AM   #1
LQ Newbie
Registered: Jan 2007
Posts: 6

Rep: Reputation: 0
Which command will use to display all .php file have size bigger than 30kb

I guest that have some php trojans in my shared hosting so I try to find them .
I know that some shell trojan have size bigger than 50kb, right ?

Could some body please tell me which command to display all .php file have size bigger than 30kb ???

Do you have any solution idea about my proplem ? how can scan all my directory and file to find trojans and remove them ???

Thank you very much for your time !
Old 09-09-2007, 06:55 AM   #2
LQ Newbie
Registered: Jun 2007
Posts: 4

Rep: Reputation: 0
Try this command to find size all php files in your home directory

for i in `find $HOME -name "*php" -print`; do echo $i; ls -l $i | awk '{ x = $5 } END { print "total Kb: " (x + 1023)/1024}'; done

Last edited by foolagain; 09-09-2007 at 07:20 AM.
Old 09-09-2007, 07:22 AM   #3
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
find / -size 30k -type f -iname *.php

This searches from the root of the filesystem for files 30kb and larger, with .php in the name of the file.
Old 09-09-2007, 08:38 AM   #4
LQ Newbie
Registered: Jan 2007
Posts: 6

Original Poster
Rep: Reputation: 0
thanks foolagain and bigrigdriver


command, find

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you write a script to display file name, Inode, and size of any file? JaxsunApex Linux - Newbie 3 01-30-2007 08:39 AM
php page can't display but download as php file? taiwf Linux - Software 2 03-07-2006 05:57 PM
size gets bigger and bigger alaios Linux - General 1 07-22-2004 10:18 AM
redhat command to display the size of directory please! sandrinechen Linux - Newbie 4 04-19-2004 03:19 AM
Cant upload a file bigger then 1mb with php OrangeLefty Programming 1 04-19-2004 01:54 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:03 AM.

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