Sponsored Content
Top Forums Shell Programming and Scripting Script to delete old directories Post 302536368 by itkamaraj on Tuesday 5th of July 2011 08:14:10 AM
Old 07-05-2011
what is the problem in your command ?

it will delete the sub directories also ( you are using -rf )
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

need some help with a script to delete directories.

Hello, I need a hand with a script im trying to make. I have a directory /usr/db/mail with a bunch of subdirectories such as /usr/db/mail/domain1.com /usr/db/mail/domain2.com etc. etc. all of these directories in turn have sub directories of their own. What I need to do is search all of... (1 Reply)
Discussion started by: centrino
1 Replies

2. Shell Programming and Scripting

shell script to delete directories...

Hi. I'm trying to write a script that will delete all directories found, that are not named as a "number" (year)... here is what i mean, let's say i have within /data/exports the following directories: /data/exports/2000 /data/exports/2001 /data/exports/2002 /data/exports/daily/2000... (5 Replies)
Discussion started by: Stephan
5 Replies

3. Shell Programming and Scripting

shell script to delete directories...

*Just realized that i posted this in the wrong forum. should have been in Shell, though it is on AIX... Hi. I'm trying to write a script that will delete all directories found, that are not named as a "number" (year)... here is what i mean, let's say i have within /data/exports the... (8 Replies)
Discussion started by: Stephan
8 Replies

4. Shell Programming and Scripting

Script to delete old directories

Hi I have 10 directories.I want to delete all the dicrectories except the three recent directories based on timestamp.I am new to BASH can u help me? (1 Reply)
Discussion started by: newuser_25
1 Replies

5. Shell Programming and Scripting

Delete Directories

Hello All, My shell script runs everyday to update certain database. Everytime the script runs it creates a directory, with "current date". These directories contain log and data files: HOME_DIR/database_name/20120417/* HOME_DIR/database_name/20120416/*... (6 Replies)
Discussion started by: ad23
6 Replies

6. Shell Programming and Scripting

Script to delete files with an input for directories and an input for path/file

Hello, I'm trying to figure out how best to approach this script, and I have very little experience, so I could use all the help I can get. :wall: I regularly need to delete files from many directories. A file with the same name may exist any number of times in different subdirectories.... (3 Replies)
Discussion started by: *ShadowCat*
3 Replies

7. Shell Programming and Scripting

Script to go Into Directories and Find/Delete files

I have a task, I usually do manually, but with growing responsibilities I tend to forget to do this weekly, I want to write a script that automates this, but I cant seem to work it out in my head, I have the shell of it out, but need help, and you guys have helped me with EVERY problem I have... (5 Replies)
Discussion started by: gkelly1117
5 Replies

8. Red Hat

How to delete only directories alone?

Hi, I need to delete (remove) only directories. How to achieve this? Plz help (4 Replies)
Discussion started by: karthick nath
4 Replies

9. Shell Programming and Scripting

Need shell script to compare directories and delete files on target server

Hello, I need help in writing the shell script for below mentioned case. There are 2 servers(server A, server B). A cronjob syncs files between these 2 servers. Existing script is copying files from A to B. This is done using the command rsync. However, the files are not deleted... (2 Replies)
Discussion started by: SravaniVedam11
2 Replies

10. Shell Programming and Scripting

Script to delete sub directories with parameters

Hello, How would I write a BASH script to remove all sub directories in a root level directory that are older than 10 days, but exclude directories owned by certain users. I would need to run as a cron job once a week. Thank you -John (2 Replies)
Discussion started by: jbeaulau
2 Replies
tapset::stap_staticmarkers(3stap)										 tapset::stap_staticmarkers(3stap)

NAME
tapset::stap_staticmarkers - systemtap stap_staticmarkers tapset DESCRIPTION
stap.pass0 Starting stap pass0 (parsing command line arguments) See probe::stap.pass0(3stap) for details. stap.pass0.end Finished stap pass0 (parsing command line arguments) See probe::stap.pass0.end(3stap) for details. stap.pass1a Starting stap pass1 (parsing user script) See probe::stap.pass1a(3stap) for details. stap.pass1b Starting stap pass1 (parsing library scripts) See probe::stap.pass1b(3stap) for details. stap.pass1.end Finished stap pass1 (parsing scripts) See probe::stap.pass1.end(3stap) for details. stap.pass2 Starting stap pass2 (elaboration) See probe::stap.pass2(3stap) for details. stap.pass2.end Finished stap pass2 (elaboration) See probe::stap.pass2.end(3stap) for details. stap.pass3 Starting stap pass3 (translation to C) See probe::stap.pass3(3stap) for details. stap.pass3.end Finished stap pass3 (translation to C) See probe::stap.pass3.end(3stap) for details. stap.pass4 Starting stap pass4 (compile C code into kernel module) See probe::stap.pass4(3stap) for details. stap.pass4.end Finished stap pass4 (compile C code into kernel module) See probe::stap.pass4.end(3stap) for details. stap.pass5 Starting stap pass5 (running the instrumentation) See probe::stap.pass5(3stap) for details. stap.pass5.end Finished stap pass5 (running the instrumentation) See probe::stap.pass5.end(3stap) for details. stap.pass6 Starting stap pass6 (cleanup) See probe::stap.pass6(3stap) for details. stap.pass6.end Finished stap pass6 (cleanup) See probe::stap.pass6.end(3stap) for details. stap.cache_clean Removing file from stap cache See probe::stap.cache_clean(3stap) for details. stap.cache_add_mod Adding kernel instrumentation module to cache See probe::stap.cache_add_mod(3stap) for details. stap.cache_add_src Adding C code translation to cache See probe::stap.cache_add_src(3stap) for details. stap.cache_add_nss Add NSS (Network Security Services) information to cache See probe::stap.cache_add_nss(3stap) for details. stap.cache_get Found item in stap cache See probe::stap.cache_get(3stap) for details. stap.system Starting a command from stap See probe::stap.system(3stap) for details. stap.system.spawn stap spawned new process See probe::stap.system.spawn(3stap) for details. stap.system.return Finished a command from stap See probe::stap.system.return(3stap) for details. staprun.insert_module Inserting SystemTap instrumentation module See probe::staprun.insert_module(3stap) for details. staprun.remove_module Removing SystemTap instrumentation module See probe::staprun.remove_module(3stap) for details. staprun.send_control_message Sending a control message See probe::staprun.send_control_message(3stap) for details. stapio.receive_control_message Received a control message See probe::stapio.receive_control_message(3stap) for details. SEE ALSO
probe::stap.pass0(3stap), probe::stap.pass0.end(3stap), probe::stap.pass1a(3stap), probe::stap.pass1b(3stap), probe::stap.pass1.end(3stap), probe::stap.pass2(3stap), probe::stap.pass2.end(3stap), probe::stap.pass3(3stap), probe::stap.pass3.end(3stap), probe::stap.pass4(3stap), probe::stap.pass4.end(3stap), probe::stap.pass5(3stap), probe::stap.pass5.end(3stap), probe::stap.pass6(3stap), probe::stap.pass6.end(3stap), probe::stap.cache_clean(3stap), probe::stap.cache_add_mod(3stap), probe::stap.cache_add_src(3stap), probe::stap.cache_add_nss(3stap), probe::stap.cache_get(3stap), probe::stap.system(3stap), probe::stap.system.spawn(3stap), probe::stap.system.return(3stap), probe::staprun.insert_module(3stap), probe::staprun.remove_module(3stap), probe::staprun.send_control_message(3stap), probe::stapio.receive_control_message(3stap), stap(1), stapprobes(3stap) IBM
--- tapset::stap_staticmarkers(3stap)
All times are GMT -4. The time now is 10:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy