Sponsored Content
Full Discussion: Menu for Purge
Top Forums Shell Programming and Scripting Menu for Purge Post 302887922 by xgringo on Tuesday 11th of February 2014 03:45:10 PM
Old 02-11-2014
Menu for Purge

I have these commands that help me find and delete files over certain days.

How can I build a menu to list the files, and then hit y for yes to delete or no?

Code:
find /logs/212/abinitio/prod/mfs/partitions/part0/mfs_12way_001/mfs_12way/sncrpt/main/ -name "*dat" -mtime +1 -exec ls -ltr {} \;
find /cddata/bi/logs/212/data/cdr/ -name "*dat" -mtime 10 -exec ls -ltr {} \;
find /logs/212/data/cem/ -name "*dat" -mtime 10 -exec ls -ltr {} \;

find /logs/212/abinitio/prod/mfs/partitions/part0/mfs_12way_001/mfs_12way/sncrpt/main/ -name "*dat" -mtime +1 -exec rm -rf {} \;
find /cddata/bi/logs/212/data/cdr/ -name "*dat" -mtime 10 -exec rm -rf {} \;
find /logs/212/data/cem/ -name "*dat" -mtime 10 -exec rm -rf {} \;


Last edited by Don Cragun; 02-11-2014 at 04:49 PM.. Reason: Add CODE tags.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

purge xterm

Being new I had my focus in the wrong place and typed in xterm instead of <If you can't guess, good>. Can I purge xterm so that this word no longer appears using up or down arrows? (1 Reply)
Discussion started by: noobie_doo
1 Replies

2. Shell Programming and Scripting

script for purge

Hi , I want to purge 7 days older data from a list of data sorted on date in a log file... Can anyone provide me with the shell script for the same.. Thanks, Jaz (1 Reply)
Discussion started by: JP003
1 Replies

3. Shell Programming and Scripting

script to archive and purge

Hi, I am writing a shell script for archive data from a table. The design is as follows. Step 1: Execute the select query and extract the data into a text file. Step 2: The primary key for this table is TRACKING_NUM, TRACKING_NUM_SUFFIX, TIMESTAMP_UPDATED. So These three fields will be read... (1 Reply)
Discussion started by: kmanivan82
1 Replies

4. Shell Programming and Scripting

Menu in Menu script issue

Problem: I am trying to create a menu in a menu script and I am running into an issue with the calculator portion of the script. I am first presented with the ==Options Menu== which all 5 options working correctly. Now comes the fun part. I select option 1 which takes me to my ==Calculator... (1 Reply)
Discussion started by: iDdraig
1 Replies

5. UNIX for Advanced & Expert Users

Purge MAil file

Hi, merry christmas. on AIX 6.1, the file /var/spool/mail/user, should/can be purged manually ? Any commande line to purge it ? Thanks. (2 Replies)
Discussion started by: big123456
2 Replies

6. Emergency UNIX and Linux Support

Purge in oracle9i

From morning we are facing some issues in tablespaces in oracle9i. Tried deleting some huge records... but even thought it is still giving tablespcases in full. Then i tried and googling ... found we need to purge recyclebin of oracle.. but thats not woking in oracle9i... can any one... (1 Reply)
Discussion started by: greenworld123
1 Replies

7. Shell Programming and Scripting

Need help in create menu with 3 sub menu using the case command

hi all i am a newbie to this is there any examples on creating a main menu with 3 sub menu main menu -> option a , b and c a menu -> option 1 ,2 and 3 b menu -> option 1 ,2 c menu -> option 1 ,2 i am getting headache as my code kept getting unexpected EOF ---------- Post... (0 Replies)
Discussion started by: chercm
0 Replies

8. UNIX for Beginners Questions & Answers

Gnome 3.28.3 menu item dissapears under the system menu

I installed CentOS 8 with Gnome 3.28.2 and I noticed that the "switch user" menu item disappeared from under the system menu of Gnome classic (Both X11 & Wayland). I checked google and this problem seems to have a history going back several releases of Gnome. Unfortunately, I never found a... (1 Reply)
Discussion started by: bodisha
1 Replies
STATE_ANALYZER(8)					       AFS Command Reference						 STATE_ANALYZER(8)

NAME
state_analyzer - Explores and queries the fileserver state database interactively SYNOPSIS
state_analyzer [state dump file | -h] DESCRIPTION
The demand-attach file server makes host / callback information persistent. On shutdown, the state is saved to database fsstate.dat(5). On startup, the state is read, verified and restored. This allows for file server shutdowns or restarts without breaking all callbacks (an operation that could otherwise take a long time). state_analyzer interactively explores and queries the saved state database, fsstate.dat(5). This command is only supported on the demand-attach file server. It operates at an extremely low-level and hence requires detailed knowledge of the OpenAFS architecture and code. COMMANDS
state_analyzer supports the following interactive commands: h <...> -- host menu o hdr -- display the host_state_header struct o first -- display the first host o prev -- display the previous host o this -- display this host o next -- display the next host o last -- display the last host o dump -- display all hosts fe <...> -- FileEntry menu o hdr -- display the callback_state_header struct o first -- display the first FE o prev -- display the previous FE o this -- display this FE o next -- display the next FE o last -- display the last FE o dump -- display all FEs o timeout -- display the timeout queue heads o hash -- display the file entry hash buckets o find by index id -- find an fe by its array index o find by fid (vol,vnode,unique) -- find an fe by its AFSFid cb <...> -- CallBack menu o hdr -- display the callback_state_entry_header struct o first -- display the first CB o prev -- display the previous CB o this -- display this CB o next -- display the next CB o last -- display the last CB o dump -- display all CBs hexdump [offset [len]] -- hex dump raw data quit -- quit current menu exit -- exit debugger help -- help message PRIVILEGE REQUIRED
The issuer must have read access to the file server state database, fsstate.dat. Usually, this means that the issuer must be the local superuser "root" on the file server machine. SEE ALSO
fsstate.dat(5), fssync-debug(8), salvsync-debug(8) COPYRIGHT
Copyright 2010 Davor Ocelic <docelic@spinlocksolutions.com> This documentation is covered by the IBM Public License Version 1.0. This man page was written by Davor Ocelic for OpenAFS, based on documentation from Tom Keiser, Steven Jenkins and others. OpenAFS 2012-03-26 STATE_ANALYZER(8)
All times are GMT -4. The time now is 12:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy