10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
Hello Friends,
I have directory called /tmp. which stores the log files.
Whenever it becomes full, i want to delete half of files from all log files.
even after deleting the files, if space is more than 90% then it should delete rest of half files.
While deleting files, older files... (7 Replies)
Discussion started by: Nakul_sh
7 Replies
3. Shell Programming and Scripting
Need a ksh script to get the files that were created or modified in a directory on a particular date entered by the user.
For example if a directory contains files as below :
> ll
total 41
-rw-rw-r-- 1 psn psn 199 Aug 23 07:06 psn_roll.sh
-rw-rw-r-- 1 psn psn ... (10 Replies)
Discussion started by: ramprabhum
10 Replies
4. Shell Programming and Scripting
Hi Everyone,
I work for GE Money IVR as a DB analyst and the environment on which I work is Solaris 5.0 server and Oracle 11g.
I got a project in which I have to clean up the folders and files which are not used in DB.
I copied an existing script and edited it, dont know this is the... (5 Replies)
Discussion started by: habeeb506
5 Replies
5. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Need to make a script, to remove all empty files and folders from current category.
It also should show the name... (2 Replies)
Discussion started by: Itixop
2 Replies
6. Shell Programming and Scripting
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
7. Shell Programming and Scripting
What I'm trying to do is write a bash file that prompts for the user's name and what the want to name the output file. If nothing is entered in either prompt the script must end and not create the output file. This is what I have so far:
#!/bin/sh
echo "What is your name?"
read NAME
if
... (4 Replies)
Discussion started by: kriminul1982
4 Replies
8. Shell Programming and Scripting
Hi all,
Can you tell me how to empty all files in a directory with a "find" command?
It does not seem to work the way I try it:
# ls -l *.dat
-rw-r--r-- 1 root root 7 Jul 20 20:51 la2.dat
-rw-r--r-- 1 root root 4 Jul 20 20:51 la.dat
# find... (9 Replies)
Discussion started by: majormark
9 Replies
9. Solaris
I am using the following Command to delete Directory with contents. But this command is deleting inside files only not directories. is there any change need in my command?
find -type f -mtime +3 -exec rm -r {} \;
Thanks (3 Replies)
Discussion started by: bmkreddy
3 Replies
10. UNIX for Advanced & Expert Users
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