Sponsored Content
Top Forums Shell Programming and Scripting remove directory x seconds after script completes Post 302251603 by tret on Monday 27th of October 2008 01:41:56 PM
Old 10-27-2008
remove directory x seconds after script completes

Hi guys,

I am working with a script within a Mac OS X package installer. The package installer will run the bash script once the files have been copied/installed. I have a little trouble with the last line of my script causing the package installer to crash once in a while and I have narrowed it down to the installer looking for the folder that I am deleting.

What I would like to do is to have the last line run a sleep/rm -rf combo and have it disassociate itself from the script. This way the script completes, the installer completes and then x number of seconds later the actual rm command takes place and the package installer isn't any the wiser.

Is this possible?

Thanks,
Rob
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to remove all empty files within the directory structure?

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

Remove shell script and its directory

Hi, I have shell script which is located in /opt/Test/test.sh code in test.sh is as follows #!/bin/sh rm -rf /opt/Test exit 0 when I tried to execute the above script from its location, it shows the following error rm: Cannot remove any directory in the path of the... (2 Replies)
Discussion started by: raghu.amilineni
2 Replies

3. Shell Programming and Scripting

Script That Can navigate to 3 differents directory & remove files under them

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

4. Shell Programming and Scripting

An Issue with the script which used to remove a file from the current directory.

Hello forum members, I am writing a script to two tasks. 1: displaying the list of the files in the current directory. 2: removing the specifed file from the list. I have written a sample script ,so can u please verfiy and correct. echo Enter list of files ls *.txt read textfile rm -f... (3 Replies)
Discussion started by: sivaranga001
3 Replies

5. Shell Programming and Scripting

Need script to remove millions of tmp files in /html/cache/ directory

Hello, I just saw that on my vps (centOS) my oscommerce with a seo script has created millions of tmp files inside the /html/cache/ directory. I would need to remove all those files (millions), I tried via shell but the vps loads goes to very high and it hangs, is there some way to do a... (7 Replies)
Discussion started by: andymc1
7 Replies

6. Shell Programming and Scripting

shell to script to remove directory

Hello All I want to delete the directory in my tree structure . all the filenames like this dd-mm-yyyy Example 30-01-2011 31-01-2011 01-02-2011 I want to grep the latest last four days created directorey by not using the find command . how do i do that ? (1 Reply)
Discussion started by: kvk_shell
1 Replies

7. Shell Programming and Scripting

Script to search for a character in files in a Directory & remove it

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

8. UNIX for Dummies Questions & Answers

Script to remove zip files from a directory

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. Programming

Cant remove directory on bash script

hi all, this is my script and as you can see in the screenshot i attach its not deleting the directory in the source folder #!/bin/bash cd /vol/cha-work/_ARCHIVE/to_be_archived/audio/robert_test temp=/mnt/robert_test/temp dest=/vol/cha-archive/audio echo "is this archive for an... (2 Replies)
Discussion started by: robertkwild
2 Replies

10. Shell Programming and Scripting

<< Environmental Variables are not set when script completes >>

Hi Team, I have a wrapper script which i have pasted below, it internally calls one python script to generate Environmental in a file called /home/oracle/myenv.sh, when i execute this script via wrapper script, its not reflecting in my current session, still showing old env variables. any... (2 Replies)
Discussion started by: kamauv234
2 Replies
SIMPLE-CDD(1)						      General Commands Manual						     SIMPLE-CDD(1)

NAME
simple-cdd - create custom debian-installer CDs SYNOPSIS
simple-cdd [options] OPTIONS
--conf Specify a configuration file --dist Specify a distribution (etch, lenny, sid) --graphical-installer|-g Enable graphical installer by default --serial-console|-s Set defaults for serial console --do-mirror Generate a local mirror --no-do-mirror Do not generate a local mirror --profiles|-p Select profiles (Examples in /usr/share/simple-cdd/profiles/ directory) --build-profiles|-b Profiles only used while building the CD --auto-profiles|-a Pre-select and automatically install these profiles --local-packages List of packages to be included on CD's local package repository --locale Select locale (language and country) --keyboard Select keyboard (console-keymaps-at/keymap debconf question) --debian-mirror Specify debian mirror (The default is: ftp://ftp.us.debian.org/debian) --security-mirror Specify securty mirror (The default is: http://security.debian.org/) --mirror-tools List the mirror tools to be used (The defaults are both wget and reprepro) --kernel-packages List of kernel packages to be included on the CD --help|-h Display the usage message --qemu|-q Use qemu to test the built image --force-preseed Only issue a warning if a preseeding file is invalid --profiles-udeb-dist Specify distribution to pull simple-cdd-profiles udeb from --extra-udeb-dist Specify additional distribution to pull udebs from EXAMPLES
simple-cdd --profiles x-basic -g Build a custom image using the default options, except for using the graphical installer by default and the x-basic profile (/usr/share/simple-cdd/x-basic.*) AUTHOR
This manual page was written by Gustavo Franco <stratus@acm.org>, for the Debian project (but may be used for others). Oct 28th, 2007 SIMPLE-CDD(1)
All times are GMT -4. The time now is 03:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy