Linux / UNIX Tech Support Forum
This is a discussion on Script to delete a set of files in Remote machine within the Shell scripting forums, part of the Development/Scripting category; Hi Guys ,, i need ur help... Its urgent I want a shell script to delete a set of files ...
|
|||||||
| Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi Guys ,,
i need ur help... Its urgent I want a shell script to delete a set of files in remote machine. Files names can be provided thru a .txt file. .txt content will be one.html two.html . . . etc thanks in advance ashok |
| Sponsored Links | ||
|
|
|
|||
|
thanks for ur reply, actually my .txt file will have just filenames.
So i need to search for that file in the following sub-directories. requirement is like search and delete the file can i do this process in remote server, where i will run script in local and delete files in remote server?? for ur info am using Solaris . thanks ashok |
|
||||
|
Login using ssh
Use find command and delete file. for eg delete all *.tmp file, enter Code:
find . -iname "*.tmp" -exec rm {} \;
Code:
ssh user@solaris.box.com find . -iname "*.tmp" -exec rm {} \;
__________________
Rocky Jr. What's wrong? I hope I am not making you uncomfortable... Never send a boy to do a mans job. |
![]() |
| Tags |
| delete file , linux , shell script , ssh |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do I delete copyright protected files? | raj | Getting started tutorials | 5 | 25-03-2008 12:48 AM |
| i need a script to delete one folder with files on my ftp | silver_ch | Shell scripting | 1 | 27-03-2007 10:15 AM |
| Shell script for automatic conversion of files in tar files | kasimani | Shell scripting | 2 | 08-02-2007 03:45 PM |
| Linux find and delete files | cbzee | Linux software | 4 | 20-12-2006 12:01 PM |
| can ext3 securely delete files | Linux software | 1 | 11-01-2006 12:08 PM | |