On Wednesday 25 August 2010 01:55 PM, Ritesh Sinha wrote:
On Wed, Aug 25, 2010 at 1:10 PM, Ramnarayan.K<[email protected]> wrote:
Hi
I accidently deleted a folder of images( using shift+del = direct
delete not to trash)
To recover them i used recoverjpg
The problem is that that recoverjpg recovered many many images. The
drive it was reading from was 200 gig which had tonnes of images,
thumbnails etc on it . Recoverjpg looks and tries to recover deleted
filed.
I had been using various image managers to create thumbnails and such
thumbnails are in lakhs
recoverjpg placed the recovered files in my /home/foouser/ location
Now this damn folder does not open because there are too many files in that
I am un able to see and access this folder and any tool from command
line gives up with the arguement
unable to execute /bin/mv: Argument list too long
whether is mv or chmod i get the same error message
My problem is that there are too many thumbnails under 100 kb - i can
safely del this but don't know a specific command that will do this
Use or modify following script ---- This will find the file less then
100kb ( you can use lt or = also ) -- give you the list of that files
and if you say "YES" it will delete that file ------
-----------------------------------------------------------------------------------------------------------------------------------------------
##/bin/bash -x
dir_to_clean=$1
cd $1
ls -l | awk '{if ($5 < 100) print ("rm -f " $8)}' > rmscript.sh
chmod +x rmscript.sh
echo "The following files less the 100 will be removed:"
cat rmscript.sh
echo -n "Proceed? [y/n]: "
read response
if [ "$response" = "y" ]
then
sh rmscript.sh
fi
rm -rf rmscript.sh
-------------------------------------------------------------------------------------------------
Regards
--
Jatin Khatri
Web www.khatrijatin.co.nr <http://www.khatrijatin.co.nr/>
www.fedoraproject.org/wiki/Jatin <http://www.fedoraproject.org/wiki/Jatin>
Phone (+91) 98250 20393
Save Paper, Save Environment.**
/*(Plant at least one tree in your life and nurture it !!!)*/
--
ubuntu-in mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-in