Sponsored Content
Top Forums Shell Programming and Scripting perl script to check if empty files are created and delete them and run a shell script Post 302432783 by hussa1n on Saturday 26th of June 2010 09:34:00 PM
Old 06-26-2010
Thanks bartus11
Can you show how this can be written in script as I'm new to scripting.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

how to delete empty files in a shell script

I'm trying to figure out a way to delete empty files in a directory. I have a cron that runs and creates a flat file every 15 mins. However, most times at night the flat file will be empty. I'd like to run a script to delete empty files that end with *.dat Any suggestions? Rich (1 Reply)
Discussion started by: rpnuge
1 Replies

2. Shell Programming and Scripting

check in unix shell script so that no one is able to run the script manually

I want to create an automated script which is called by another maually executed script. The condition is that the no one should be able to manually execute the automated script. The automated script can be on the same machine or it can be on a remote machine. Can any one suggest a check in the... (1 Reply)
Discussion started by: adi_bang76
1 Replies

3. Shell Programming and Scripting

Need to check for empty file in C shell script

I am running a C shell script. I have an output file from a previous step and I need to run "something" in the next step to check if the file is empty. If the file is empty, then the job script should finish EOJ. If the file is not empty then the job script should abend. Please help Thanks. (4 Replies)
Discussion started by: jclanc8
4 Replies

4. Shell Programming and Scripting

Script to delete empty files

I'm trying to write a shell script to files of zero length in a specified directory, but I keep getting errors. Would anybody be kind enough to look it over for issues? Thanks a bunch in advance. #!/bin/sh if then if then find $1 -type f -size 0 -print|xargs rm exit 0... (1 Reply)
Discussion started by: ScriptingIssues
1 Replies

5. Shell Programming and Scripting

How to give full access to output files created by .sh script run via crontab?

Hi Expert, I have a .sh script in my home/new_dir/script.sh This script creates number of output files at home/new_dir/email, home/new_dir/logs dir. I am running this script using crontab (owner root). Now this output files are getting created with rw-r----- 1 root root So if i... (2 Replies)
Discussion started by: Jeet1982
2 Replies

6. Shell Programming and Scripting

Shell/perl script to check for files

Hi, I am trying to write a script for following scenario: I have a list of countries from where I receive files...eg. (Indonesia, Thailand, Australia...etc) For each country, I have a list of files that they send. IND -- a,b,c TH -- p,q,r AU -- x,y,z The path for these files could... (2 Replies)
Discussion started by: neil.k
2 Replies

7. Shell Programming and Scripting

Script needed to delete to the list of files in a directory based on last created & delete them

Hi My directory structure is as below. dir1, dir2, dir3 I have the list of files to be deleted in the below path as below. /staging/retain_for_2years/Cleanup/log $ ls -lrt total 0 drwxr-xr-x 2 nobody nobody 256 Mar 01 16:15 01-MAR-2015_SPDBS2 drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: prasadn
2 Replies

8. Shell Programming and Scripting

To check whether the file is empty or not in shell script (sh)

Hi All, I need to check a file whether it exists and also whether it is empty or not. I have a code for this but it is not working as per my requirement. Can anyone pls suggest me on this. function funcFLSanityCheck { if then echo "${varFLSentFileListPath}/${varFLSentFileName}... (7 Replies)
Discussion started by: Arun1992
7 Replies

9. Shell Programming and Scripting

Shell script to check a file and delete old files

Hello, I needed help with a shell script where in it checks if a file exists under a directory and also checks the age of the file and delete it if it is older than 3 weeks. thanks (10 Replies)
Discussion started by: hasn318
10 Replies

10. Shell Programming and Scripting

Shell script to delete empty files from specific locations

Hi, I need help in regard to developing a shell script to delete empty files from multiple specific locations. The directory paths will be stored in a text file. So the requirement is to read the text file for one specific path and then remove empty files from that particular path. Looping through... (4 Replies)
Discussion started by: Khan28
4 Replies
TEXTDUMP(4)						   BSD Kernel Interfaces Manual 					       TEXTDUMP(4)

NAME
textdump -- textdump kernel dumping facility SYNOPSIS
options KDB options DDB DESCRIPTION
The textdump facility allows the capture of kernel debugging information to disk in a human-readable rather than the machine-readable form normally used with kernel memory dumps and minidumps. This representation, while less complete in that it does not capture full kernel state, can provide debugging information in a more compact, portable, and persistent form than a traditional dump. By combining textdump with other ddb(4) facilities, such as scripting and output capture, detailed bug information can be captured in a fully automated manner. FORMAT
textdump data is stored in a dump partition in the same style as a regular memory dump, and will be automatically extracted by savecore(8) if present on boot. textdump files are stored in the tar(5) format, and consist of one or more text files, each storing a particular type of debugging output. The following parts may be present: ddb.txt Captured ddb(4) output, if the capture facility has been used. May be disabled by clearing the debug.ddb.textdump.do_ddb sysctl. config.txt Kernel configuration, if has been compiled into the kernel. May be disabled by clearing the debug.ddb.textdump.do_config sysctl. msgbuf.txt Kernel message buffer, including recent console output if the capture facility has been used. May be disabled by clearing the debug.ddb.textdump.do_msgbuf sysctl. panic.txt Kernel panic string, if the kernel panicked before the dump was generated. May be disabled by clearing the debug.ddb.textdump.do_panic sysctl. version.txt Kernel version string. My be disabled by clearing the debug.ddb.textdump.do_version sysctl. Kernel textdumps may be extracted using tar(1). CONFIGURATION
The textdump facility is enabled as part of the kernel debugger using options KDB and options DDB. By default, kernel dumps generated on panic or via explicit requests for a dump will be regular memory dumps; however, by using the textdump set command in ddb(4), or by setting the debug.ddb.textdump.pending sysctl to 1 using sysctl(8), it is possible to request that the next dump be a textdump. If at the ddb(4) command line, the commands textdump set, textdump status, and textdump unset may be used to set, query, and clear the textdump pending flag. As with regular kernel dumps, a dump partition must be automatically or manually configured using dumpon(8). EXAMPLES
In the following example, the script kdb.enter.panic will run when the kernel debugger is entered as a result of a panic, enable output cap- ture, dump several useful pieces of debugging information, and then invoke panic in order to force a kernel dump to be written out followed by a reboot: script kdb.enter.panic=textdump set; capture on; show allpcpu; bt; ps; alltrace; show alllock; call doadump; reset In the following example, the script kdb.enter.witness will run when the kernel debugger is entered as a result of a witness violation, printing lock-related information for the user: script kdb.enter.witness=show locks These scripts may also be configured using the ddb(8) utility. SEE ALSO
tar(1), ddb(4), tar(5), ddb(8), dumpon(8), savecore(8), sysctl(8) HISTORY
The textdump facility first appeared in FreeBSD 7.1. AUTHORS
The textdump facility was created by Robert N. M. Watson. BSD
December 24, 2008 BSD
All times are GMT -4. The time now is 10:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy