Thanks a lot!!!!!! Join Date: Mar Remove empty files in home directory. 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 Shell script to compare ,diff and remove betwen 2 files. Hi Friends Need your expertise. Command to check the difference and compare 2 files and remove lines. Can you guide me how can i accomplish How to create a shell script to remove the files on solaris server at hrs? Hi folks, As per mentioned in the title, how to create a shell script to delete those files from the server at hrs every day?
Thanks in advance : 2 Replies. Shell script to remove files. I am working in directory week5 and I want to delete the files in directory week1, without leaving directory week5.
I understand that rm is used to delete a file, but how do you remove them while working in a different directory. 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 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. Saying "Unix" is very vague. There are many unix-like OSs. You should specify the actual OS. Add a comment. Active Oldest Votes. Improve this answer. Piotr Findeisen Piotr Findeisen 2 2 silver badges 5 5 bronze badges.
If so, I modified my answer. If not so, please give an example. They can a result of another find , not sure how to specify the depth to find dirs in the root dir only have no chance to test now, try man find. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Today's Posts. Quick Links. Search Forums. Show Threads. Show Posts. Registered User. Join Date: Jul 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. Join Date: Apr Shell Programming and Scripting. Shell script to delete the ip address from files. Hello, I am new to shell scripting, need help, my requirement is to delete the ip address from serveral files, please suggest 2 Replies. 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
0コメント