05-04-2011
I think it hangs because first it try to find/list all files within folder and then operate... if you are fine to delete that folder itself and create a new one that would speed up...
---------- Post updated at 07:22 PM ---------- Previous update was at 07:18 PM ----------
#!/bin/bash
cd /html/
mv cache cache.bak
mkdir cache
rm -rf cache.bak
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi I need to write a shell script which basically searches for all the empty files within the directory structure, lists them before asking the user to confirm if they would like to delete them. If the user deletes the file then a notice would appear confirming the file is deleted.
I've be... (5 Replies)
Discussion started by: cat123
5 Replies
2. Shell Programming and Scripting
hi friends.
i have to make a perl script to generate all users and space(how much they are using) and files(how much files they have) and time(how much time that accessed /tmp buffer) from /tmp directory.
please provide me guidance.
regards
pranesh b. mishra (2 Replies)
Discussion started by: praneshmishra08
2 Replies
3. Web Development
Because of permission issues, I need to link to images in my web page which are stored in /tmp which of course is located in the root directory but my actual html page is much further down in another directory. I thought the the following code should work, but the image comes up as a broken link:... (2 Replies)
Discussion started by: Solerous
2 Replies
4. Shell Programming and Scripting
Hi
I am Trying to Write a script that can goto 4 different directorys on the server & remove the Files older then 30 days ??
/logs
logs1 logs2 logs3
Now I need to remove files under
logs1 logs2 logs3 which are older then 30 days whose name stat 'sit' , 'mig','bld' .
in... (3 Replies)
Discussion started by: Beginner123
3 Replies
5. Shell Programming and Scripting
Does anybody know how to remove all urls from html files?
all urls are links with anchor texts in the form of
<a href="http://www.anydomain.com">ANCHOR</a>
they may start with www or not.
Goal is to delete all urls and keep the ANCHOR text and if possible to change tags around anchor to... (2 Replies)
Discussion started by: georgi58
2 Replies
6. Shell Programming and Scripting
Hi All,
Am new to both Unix & this Forum - Need some help on a script that I am trying to write:
In a Directory i have few text files which might or might not contain some text that I am trying to find.
Once that text is found in any of the files, it needs to be removed from the file
... (6 Replies)
Discussion started by: rituparna_gupta
6 Replies
7. UNIX for Dummies Questions & Answers
Hey Guys,
I am facing an annoying scenario, fewer times when I execute the sort command, it throws out on error saying that "No Space on available on /var/tmp/<temp file name>. May be it is set to /var/tmp directory. I was wondering, if I cant redirect the temporary file creation to any other... (3 Replies)
Discussion started by: abhisheksunkari
3 Replies
8. UNIX for Dummies Questions & Answers
Hi Folks,
There is a job which generates a .zip files every day at /usr/app/generated directory , now please advise for the script that will delete this zip files permanently.but while deleting it should make sure that it will not delete the last two days recently generated zip files and this... (1 Reply)
Discussion started by: punpun66
1 Replies
9. Shell Programming and Scripting
I have downloaded source code for 97 files using:
wget -x -i link.txt then run a rename loop:
for file in *
do
mv $file $file.txt
done to keep the html tags but make the file a text that can be parsed.
In each of the 97 txt files the gene # is variable, but the gene is associated... (15 Replies)
Discussion started by: cmccabe
15 Replies
10. Shell Programming and Scripting
Hi,
i need help on shell scripting.
Main intention of the script is
step 1: ssh to remote server
Step 2: cd /tmp in remote server
Step 3: in tmp i want to grep only files and directories which are in GB sizes
All the servers list file is - tmpsrv.txt
vi tmpsrv.txt
... (17 Replies)
Discussion started by: kumar85shiv
17 Replies