10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I am new to shell scripting, need help,
my requirement is to delete the ip address from serveral files,
please suggest (2 Replies)
Discussion started by: manoj.solaris
2 Replies
2. 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
3. Shell Programming and Scripting
My code to "Delete empty files from a directory entered in command promt"
#/bin/sh
echo "Enter directory"
read gh
for file in `ls $gh`
do
# to get the size of file
a=$( ls -l file | awk ' {print $7} ');
echo $a
if
then
echo "removing file "
rm file
fi
done (6 Replies)
Discussion started by: adirajup
6 Replies
4. 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
5. Shell Programming and Scripting
Hi All,
Can anyone please write a shell script to remove the empty files using an if condition.
please help me out , urgent
thanks (6 Replies)
Discussion started by: muthi_murali
6 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
I have a local linux machine in which the files are dumped by a remote ubuntu server. If the process in remote server has any problem then empty files are created in local machine. Is there any way using perl script to check if the empty files are being created and delete them and then run a shell... (2 Replies)
Discussion started by: hussa1n
2 Replies
8. AIX
I have av script that loops through some statistic files to create a report. We would like to only loop through non-empty files as these files create an empty report-line.
I have figured out how to find the non-empty files, but not how to loop through only those files.
Here is the code that finds... (4 Replies)
Discussion started by: Tessa
4 Replies
9. Shell Programming and Scripting
i want to delete all the files in my directory except the latest one. i need to do this from shell script.
say i have
a.txt - latest file
b.txt,
c.txt..
it should delete all the files except a.txt? (4 Replies)
Discussion started by: krishnarao
4 Replies
10. Shell Programming and Scripting
Hi,
I have the following task to perform using shell script.
The user will provide a directory name along with a date. The script will delete all the files in the specified directory that was created earlier to that date. Also it should display the number of files that has been deleted.
... (7 Replies)
Discussion started by: theguy16
7 Replies