LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 02-16-2016, 02:32 PM   #1
DVOM
Member
 
Registered: Nov 2010
Posts: 223

Rep: Reputation: 48
script for cleaning Ubuntu


I would like to create a script that I can manually run or have run at startup. I would like the following included:

rm -f /home/jars/.cache/mozilla/firefox/mwad0hks.default/cache2/entries/*

rm -f /home/jars/.cache/thumbnails/normal/*

rm -f /home/jars/.cache/thumbnails/large/*

rm -f /home/jars/.thumbnails/normal/*

I can run these in terminal one at a time and get the results I want but would like to make it a little more convenient.

TIA
 
Old 02-16-2016, 02:37 PM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Code:
#!/bin/bash

/usr/bin/rm -f /home/jars/.cache/mozilla/firefox/mwad0hks.default/cache2/entries/*

/usr/bin/rm -f /home/jars/.cache/thumbnails/normal/*

/usr/bin/rm -f /home/jars/.cache/thumbnails/large/*

/usr/bin/rm -f /home/jars/.thumbnails/normal/*
remember to chmod 744 it.
 
Old 02-16-2016, 03:15 PM   #3
DVOM
Member
 
Registered: Nov 2010
Posts: 223

Original Poster
Rep: Reputation: 48
thanks schneidz, I had already created a file identical to what you've got there. I didn't have to chmod it, all I had to do was to set it executable and to open with bash.

Problem solved. Thanks again.
 
  


Reply



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
script for cleaning firefox history items zetrotrack000 Linux - Software 6 11-27-2014 11:19 AM
[SOLVED] Bash: Script for cleaning Voicemails from Asterisk. Mortuus Programming 4 04-17-2010 01:56 AM
Cleaning up my first bash script altup Linux - Newbie 2 09-15-2009 03:26 PM
script for cleaning log Imranteli Linux - Newbie 3 09-10-2009 11:25 PM
cleaning the readability of this ruby script hedpe Programming 1 12-26-2006 02:46 PM

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

All times are GMT -5. The time now is 07:29 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