04-07-2011
Start from the prefixes, delete script
My folder is/app2/istech/scratch, which contain all the below files.
I need to delete the files which start from the prefixes.
dup_events_*.*
Event_*.*
New_time_*.*
New_Loc_*.*
New_Uptime_*.*
Detailed_Reason*.*
cmt_dup_*.*
Uptime_*.*
Can anyone please let me know how to write a shell script for this, it would be of great help.
Thanks,
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
guys/gals...does anyone have a startup shell script for oracle/sybase...meaning at shutdown the databases stop themselves and at start up they start automatically...thanks much... (3 Replies)
Discussion started by: suntan
3 Replies
2. UNIX for Dummies Questions & Answers
I've been away from Unix and the vi editor for a while, and now I'm using vi (actually vim) in a Cygwin bash shell. When I copy-and-paste code examples (I'm playing with perl now) any time I paste code with lines beginning with the # character, vi inserts a # character at the beginning of every... (2 Replies)
Discussion started by: greenmangroup
2 Replies
3. Shell Programming and Scripting
Hi,
I need to remove all lines from a file that do not start with numbers
For instance, if the first three characters on any line are not numbers, delete those lines
I've tried to do it with awk and it's not working, any ideas ?
Thanks (5 Replies)
Discussion started by: sfisk
5 Replies
4. Shell Programming and Scripting
Hello,
at the moment I'm on with programming some kind of version history script for network devices.
The configration files are uploaded in the form:
devicename-confg_date_time.
For keeping the last 10 configurations I want to split the devicename from the rest. This works well with... (5 Replies)
Discussion started by: Sally[-_-]
5 Replies
5. Shell Programming and Scripting
E.g. the file is like this:
I want to delete all lines that begin with a number larger than 2, ignoring the lines that doesn't begin with a number!
PS:'2' is actually a variable that can have a lot of values:b:i bet you got it (10 Replies)
Discussion started by: hakermania
10 Replies
6. UNIX for Dummies Questions & Answers
I have this space delimited large text file with more than 1,000,000+ columns and about 100 rows. I want to delete all the columns that start with NA such that:
File before modification
aa bb cc NA100 dd
aa b1 c2 NA101 de
File after modification
aa bb cc dd
aa b1 c2 de
How would I... (3 Replies)
Discussion started by: evelibertine
3 Replies
7. Red Hat
ENVIROMENT
Linux: Fedora Core release 1 (Yarrow)
iPlanet: iPlanet-WebServer-Enterprise/6.0SP1
Log Path: /usr/iplanet/servers/https-company/logs
I have iPlanet log rotation enabled rotating files on a daily basis.
The rotated logs are NOT compressed & are taking up too much space.
I... (7 Replies)
Discussion started by: zachs
7 Replies
8. Shell Programming and Scripting
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
9. Shell Programming and Scripting
Shell : Bash shell
I have a text file with entries like below
srv.sr_num sr_number, atvx.ATTRIB_37 Product_Name, ktx.X_ATTRIB_52 Product_Type, mkx.created sr_created_date, nbv.sr_cat_type_cd sr_type, bkrx.sr_area sr_category, ..
frx.order_id, des.stats_name , fpxg.current_id_name, ......
.... (3 Replies)
Discussion started by: John K
3 Replies
10. UNIX for Beginners Questions & Answers
Hi, In my previous post ( How to print lines from a files with specific start and end patterns and pick only the last lines? ), i have got a help to get the last select statement from a file, now i need to remove/exclude the output from main file:
Input File format:
SELECT
ABCD,
DEFGH,... (2 Replies)
Discussion started by: nani2019
2 Replies
LEARN ABOUT DEBIAN
mtp_objects
The object management API.(3) libmtp The object management API.(3)
NAME
libmtp - The object management API.
Functions
int LIBMTP_Delete_Object (LIBMTP_mtpdevice_t *, uint32_t)
int LIBMTP_Set_Object_Filename (LIBMTP_mtpdevice_t *, uint32_t, char *)
Detailed Description
Function Documentation
int LIBMTP_Delete_Object (LIBMTP_mtpdevice_t *device, uint32_tobject_id)
This function deletes a single file, track, playlist, folder or any other object off the MTP device, identified by the object ID.
If you delete a folder, there is no guarantee that the device will really delete all the files that were in that folder, rather it is
expected that they will not be deleted, and will turn up in object listings with parent set to a non-existant object ID. The safe way to do
this is to recursively delete all files (and folders) contained in the folder, then the folder itself.
Parameters:
device a pointer to the device to delete the object from.
object_id the object to delete.
Returns:
0 on success, any other value means failure.
References LIBMTP_mtpdevice_struct::params.
int LIBMTP_Set_Object_Filename (LIBMTP_mtpdevice_t *device, uint32_tobject_id, char *newname)
THIS FUNCTION IS DEPRECATED. PLEASE UPDATE YOUR CODE IN ORDER NOT TO USE IT.
See Also:
LIBMTP_Set_File_Name()
LIBMTP_Set_Track_Name()
LIBMTP_Set_Folder_Name()
LIBMTP_Set_Playlist_Name()
LIBMTP_Set_Album_Name()
References LIBMTP_file_struct::filetype, and LIBMTP_Get_Filemetadata().
Author
Generated automatically by Doxygen for libmtp from the source code.
Version 1.1.3 Sun Feb 17 2013 The object management API.(3)