Sponsored Content
Top Forums Shell Programming and Scripting Delete file with specific date Post 302729517 by Jewel on Saturday 10th of November 2012 02:47:57 AM
Old 11-10-2012
Delete file with specific date

let say i have list of file


PermissionsDirectoriesGroupSizeDateDirectory or file

Code:
drwx------2users4096Nov 2 19:51mailv
drwxr-s---35www 32768Jan 20 22:39public_htmlt
drwx------ 2 users 4096 Nov 2 19:51 mail
drwxr-s--- 35 www 32768 Jan 20 22:39 public_html 
drwxr-s--- 35 www 32768 Jan 20 22:39 public_html


i want to dete the file only on date with Jan 20 file.

Thanks
Jewel

Last edited by Scrutinizer; 11-10-2012 at 05:36 AM.. Reason: spelling correction; code tags (mod)
 

10 More Discussions You Might Find Interesting

1. Programming

Delete specific lines in a text file

Hi, experts, I would like to create a function that can calculate the total number of lines in a saved text file and delete specific lines in that particular file (I only want the last few lines). Hav anybody have the experience and giv me a hand in this? (9 Replies)
Discussion started by: dniz
9 Replies

2. Shell Programming and Scripting

Delete lines prior to a specific date in a log file.

Hi all. I have a database log file in which log data get appended to it daily. I want to do a automatic maintainence of this log by going through the log and deleting lines belonging to a certain date. How should i do it? Please help. Thanks. Example. To delete all lines prior to Jun... (4 Replies)
Discussion started by: ahSher
4 Replies

3. Shell Programming and Scripting

Delete specific lines from a file

Hi, I have a file ( all_users.ldif ) of the following format: cn=orcladmin, cn=Users, dc=maximus,dc=com cn=PUBLIC, cn=Users, dc=maximus,dc=com cn=portal,cn=users,dc=maximus,dc=com cn=portal_admin,cn=users,dc=maximus,dc=com cn=uddi_publisher,cn=Users,dc=maximus,dc=com... (4 Replies)
Discussion started by: itzz.me
4 Replies

4. Shell Programming and Scripting

Delete files created before specific date.

There is a system logging a huge amount of data and we need to delete some of the older logs .I mean the files that are created before one week from today. Here is a listing of files that are sitting there: /usr/WebSphere/AppServer/logs # ls -l -rw-r--r-- 1 root system 3740694 May... (5 Replies)
Discussion started by: moustafashawky
5 Replies

5. UNIX for Dummies Questions & Answers

Delete a row from a file if one column containing a date is greater than the current system date

Hello gurus, I am hoping someone can help me with the required code/script to make this work. I have the following file with records starting at line 4: NETW~US60~000000000013220694~002~~IT~USD~2.24~20110201~99991231~01~01~20101104~... (4 Replies)
Discussion started by: chumsky
4 Replies

6. UNIX Desktop Questions & Answers

How to delete files from a specific date?

Guys, I am wondering how to remove files for a specific date in a directory? for instance when I do ls -l , i see many files. And i want to delete files for date May 15: 58252015 May 10 03:45 my_05102012.log 58252015 May 15 06:45 my_05152012.log Thanks (8 Replies)
Discussion started by: DallasT
8 Replies

7. Shell Programming and Scripting

Delete log files content older than 30 days and append the lastest date log file date

To delete log files content older than 30 days and append the lastest date log file date in the respective logs I want to write a shell script that deletes all log files content older than 30 days and append the lastest log file date in the respective logs This is my script cd... (2 Replies)
Discussion started by: sreekumarhari
2 Replies

8. UNIX for Dummies Questions & Answers

Search for a specific String in a log file for a specific date range

Hi, I have log file which rolls out every second which is as this. HttpGenRequest - -<!--OXi dbPublish--> <created="2014-03-24 23:45:37" lastMsgId="" requestTime="0.0333"> <response request="getOutcomeDetails" code="114" message="Request found no matching data" debug="" provider="undefined"/>... (3 Replies)
Discussion started by: karthikprakash
3 Replies

9. UNIX for Dummies Questions & Answers

Delete specific strings in a file

Hi, My file has a numerous sttrings.I want to retain those strings which start with stt and delete entries with >C For eg: my infile is >C4603985... (7 Replies)
Discussion started by: sa@@
7 Replies

10. Shell Programming and Scripting

Count specific character of a file in each line and delete this character in a specific position

I will appreciate if you help me here in this script in Solaris Enviroment. Scenario: i have 2 files : 1) /tmp/TRANSACTIONS_DAILY_20180730.txt: 201807300000000004 201807300000000005 201807300000000006 201807300000000007 201807300000000008 2)... (10 Replies)
Discussion started by: teokon90
10 Replies
BOSSERVER(8)						       AFS Command Reference						      BOSSERVER(8)

NAME
       bosserver - Initializes the BOS Server

SYNOPSIS
       bosserver
	   [-noauth]
	   [-log]
	   [-enable_peer_stats]
	   [-auditlog <log path>]
	   [-audit-interface ( file | sysvmq )]
	   [-enable_process_stats]
	   [-allow-dotted-principals]
	   [-cores[=none|<path>]]
	   [-restricted]
	   [-rxmaxmtu <bytes>]
	   [-rxbind]
	   [-syslog[=<facility>]>]
	   [-pidfiles[=<path>]]
	   [-nofork]
	   [-help]

DESCRIPTION
       The bosserver command initializes the Basic OverSeer (BOS) Server (bosserver process). In the conventional configuration, the binary file
       is located in the /usr/lib/openafs directory on a file server machine.

       The BOS Server must run on every file server machine and helps to automate file server administration by performing the following tasks:

       o   Monitors the other AFS server processes on the local machine, to make sure they are running correctly.

       o   Automatically restarts failed processes, without contacting a human operator. When restarting multiple server processes simultaneously,
	   the BOS Server takes interdependencies into account and initiates restarts in the correct order.

       o   Processes commands from the bos suite that administrators issue to verify the status of server processes, install and start new
	   processes, stop processes either temporarily or permanently, and restart halted processes.

       o   Manages system configuration information: the files that list the cell's server encryption keys, database server machines, and users
	   privileged to issue commands from the bos and vos suites.

       The BOS Server is configured via the BosConfig configuration file.  Normally, this file is managed via the bos command suite rather than
       edited directly.  See the BosConfig(5) man page for the syntax of this file.

       The BOS Server will rewrite BosConfig when shutting down, so changes made manually to it will be discarded.  Instead, to change the BOS
       Server configuration only for the next restart of bosserver, create a file named /etc/openafs/BosConfig.new.  If BosConfig.new exists when
       bosserver starts, it is renamed to /etc/openafs/BosConfig, removing any existing file by that name, before bosserver reads its
       configuration.

       The BOS Server logs a default set of important events in the file /var/log/openafs/BosLog. To record the name of any user who performs a
       privileged bos command (one that requires being listed in the /etc/openafs/server/UserList file), add the -log flag. To display the
       contents of the BosLog file, use the bos getlog command.

       The first time that the BOS Server initializes on a server machine, it creates several files and subdirectories in the local /usr/afs
       directory, and sets their mode bits to protect them from unauthorized access. Each time it restarts, it checks that the mode bits still
       comply with the settings listed in the following chart. A question mark indicates that the BOS Server initially turns off the bit (sets it
       to the hyphen), but does not check it at restart.

	  /usr/afs		drwxr?xr-x
	  /var/lib/openafs/backup	drwx???---
	  /usr/lib/openafs	    drwxr?xr-x
	  /var/lib/openafs/db		drwx???---
	  /etc/openafs/server	       drwxr?xr-x
	  /etc/openafs/server/KeyFile  -rw????---
	  /etc/openafs/server/UserList -rw?????--
	  /var/lib/openafs/local	drwx???---
	  /var/log/openafs	   drwxr?xr-x

       If the mode bits do not comply, the BOS Server writes the following warning to the BosLog file:

	  Bosserver reports inappropriate access on server directories

       However, the BOS Server does not reset the mode bits, so the administrator can set them to alternate values if desired (with the
       understanding that the warning message then appears at startup).

       This command does not use the syntax conventions of the AFS command suites. Provide the command name and all option names in full.

OPTIONS
       -noauth
	   Assigns the unprivileged identity "anonymous" to the issuer, which is useful only when authorization checking is disabled on the server
	   machine (for instance, during the installation of a file server machine.)

       -log
	   Records in the /var/log/openafs/BosLog file the names of all users who successfully issue a privileged bos command (one that requires
	   being listed in the /etc/openafs/server/UserList file).

       -cores=none|<path>
	   The argument none turns off core file generation. Otherwise, the argument is a path where core files will be stored.

       -auditlog <log path>
	   Turns on audit logging, and sets the path for the audit log.  The audit log records information about RPC calls, including the name of
	   the RPC call, the host that submitted the call, the authenticated entity (user) that issued the call, the parameters for the call, and
	   if the call succeeded or failed.

       -audit-interface (file | sysvmq)
	   Specifies what audit interface to use. Defaults to "file". See fileserver(8) for an explanation of each interface.

       -enable_peer_stats
	   Activates the collection of Rx statistics and allocates memory for their storage. For each connection with a specific UDP port on
	   another machine, a separate record is kept for each type of RPC (FetchFile, GetStatus, and so on) sent or received. To display or
	   otherwise access the records, use the Rx Monitoring API.

       -enable_process_stats
	   Activates the collection of Rx statistics and allocates memory for their storage. A separate record is kept for each type of RPC
	   (FetchFile, GetStatus, and so on) sent or received, aggregated over all connections to other machines. To display or otherwise access
	   the records, use the Rx Monitoring API.

       -allow-dotted-principals
	   By default, the RXKAD security layer will disallow access by Kerberos principals with a dot in the first component of their name. This
	   is to avoid the confusion where principals user/admin and user.admin are both mapped to the user.admin PTS entry. Sites whose Kerberos
	   realms don't have these collisions between principal names may disable this check by starting the server with this option.

       -restricted
	   In normal operation, the bos server allows a super user to run any command.	When the bos server is running in restricted mode (either
	   due to this command line flag, or when configured by bos_setrestricted(8)) a number of commands are unavailable. Note that this flag
	   persists across reboots.  Once a server has been placed in restricted mode, it can only be opened up by sending the SIGFPE signal.

       -rxmaxmtu <bytes>
	   Sets the maximum transmission unit for the RX protocol.

       -rxbind
	   Bind the Rx socket to the primary interface only.  If not specified, the Rx socket will listen on all interfaces.

       -syslog[=<facility>]>
	   Specifies that logging output should go to syslog instead of the normal log file.  -syslog=facility can be used to specify to which
	   facility the log message should be sent.

       -pidfiles[=<path>]
	   Create a one-line file containing the process id (pid) for each non-cron process started by the BOS Server.	This file is removed by
	   the BOS Server when the process exits.  The optional <path> argument specifies the path where the pid files are to be created.  The
	   default location is "/var/lib/openafs/local".

	   The name of the pid files for "simple" BOS Server process types are the BOS Server instance name followed by ".pid".

	   The name of the pid files for "fs" and "dafs" BOS Server process types are the BOS Server type name, "fs" or "dafs", followed by the
	   BOS Server core name of the process, followed by ".pid".  The pid file name for the "fileserver" process is "fs.file.pid". The pid file
	   name for the "volserver" is "fs.vol.pid".

	   BOS Server instance names are specfied using the bos create command.  See bos_create for a description of the BOS Server process types
	   and instance names.

       -nofork
	   Run the BOS Server in the foreground. By default, the BOS Server process will fork and detach the stdio, stderr, and stdin streams.

       -help
	   Prints the online help for this command. All other valid options are ignored.

EXAMPLES
       The following command initializes the BOS Server and logs the names of users who issue privileged bos commands.

	  % bosserver -log

PRIVILEGE REQUIRED
       The issuer most be logged onto a file server machine as the local superuser "root".

SEE ALSO
       BosConfig(5), BosLog(5), bos(8), bos_create(8), bos_exec(8), bos_getlog(8), bos_getrestart(8), bos_restart(8), bos_setrestricted(8),
       bos_shutdown(8), bos_start(8), bos_startup(8), bos_status(8), bos_stop(8)

COPYRIGHT
       IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.

       This documentation is covered by the IBM Public License Version 1.0.  It was converted from HTML to POD by software written by Chas
       Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.

OpenAFS 							    2012-03-26							      BOSSERVER(8)
All times are GMT -4. The time now is 06:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy