Sponsored Content
Full Discussion: Removing files
Top Forums UNIX for Advanced & Expert Users Removing files Post 302122935 by LiquidChild on Friday 22nd of June 2007 05:17:53 AM
Old 06-22-2007
Removing files

Hi,

It seems someone has created files instead of actually running the commands, as below:

-rw-r--r-- 1 oracle92 dba 0 Mar 2 11:19 PRIML_070302.ok
-rw-r--r-- 1 oracle92 dba 557 Mar 2 11:20 PRIVH_070302.dat
-rw-r--r-- 1 oracle92 dba 0 Mar 12 11:57
exit
exit
PSI=$PWD
-rw-r--r-- 1 oracle92 dba 0 Mar 12 11:57
exit
bye

-rw-r--r-- 1 oracle92 dba 0 Mar 12 11:57
PWD


PSI=$PWD
-rw-r--r-- 1 oracle92 dba 95 Mar 20 17:14 afiedt.buf
-rw-r--r-- 1 oracle92 dba 95 Mar 20 17:14 public_grant_query.sql
drwxr-xr-x 10 root other 512 Mar 21 16:17 sosa

the file 'exit exit PSI...'

How can I delete these though?

Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Removing Files

I am trying to remove a file so that I can delete a directory. Unfortuantely the file looks like this --------.--- and the system is not allowing me to remove the file. System message is rm: Error: Illegal option -- - usage: rm file... I have tried rm * and rm *.* to no avail. Any... (5 Replies)
Discussion started by: Blondie
5 Replies

2. UNIX for Dummies Questions & Answers

Removing files

I have AIX 5.1 I was wondering how to remove a file name with a space in it Say {tb lsv.csv} ? When I use the {rm} command if you have a space it thinks it is a new file. So it looks for {tb} and {lsv.csv} instead of the name as a whole. Thanks in advance Dave By the way guys and gals the... (5 Replies)
Discussion started by: rocker40
5 Replies

3. Solaris

Removing Files

Hi Everyone , have a nice day what will be the command to be given in certain directory which removes all those files present in that very directory which were last modified one month ago ? Regards and Waiting (1 Reply)
Discussion started by: Dastard
1 Replies

4. UNIX for Dummies Questions & Answers

removing files

Hello all, I'd like to remove files which is returned by the following statement ls -l arch*.dbf|grep "`date|cut -c5-10`" (cut -c5-10 =Mar 20) To achive this,I tried the following statments but none worked .. rm < `ls -l arch*.dbf|grep "`date|cut -c5-10`"` rm `ls -l arch*.dbf|grep... (8 Replies)
Discussion started by: luft
8 Replies

5. Shell Programming and Scripting

removing old files except configuration files and folders

Dear all, I want to remove files older than 2 months in the /home/member directory. But except the configuration files (like .bash_profile .config/ .openoffice/ .local/ .kde/ etc..) I have tried with the command find . -mtime +60 -wholename './.*' -prune -o -print -exec mv {} \; but it... (1 Reply)
Discussion started by: jamcalicut
1 Replies

6. UNIX for Dummies Questions & Answers

Removing Files

Hi, This might seem like a really stupid question but i have created a shell script and at the end of the script i want to remove most of the file i create. So I have: rm file test sorted However this does not work for the sorted one. The only way i can get this to work is if i do: rm... (4 Replies)
Discussion started by: jazz8146
4 Replies

7. Shell Programming and Scripting

Help with removing files

i have a directory that have files that contains word "spam", how can i remove all those files which have word spam. This code help me in searching find ./ -type f -exec grep -l "spam" {} \; How i will add removing option with it. If some one have good suggestion regarding searching... (2 Replies)
Discussion started by: learnbash
2 Replies

8. UNIX for Dummies Questions & Answers

Removing files

How do you delete/remove multiple files ? (5 Replies)
Discussion started by: nosuchluck
5 Replies

9. UNIX for Dummies Questions & Answers

Help in Removing the Old files

Hi Gurus, we are planning to clear the old log files based on the year and i need help on this and i searched in google and i came up with the scripts but i am stuck with this. (1) wroks fine How many files exist in based on the extension find -type f | sed -e 's/.*\.//' | sort | uniq... (1 Reply)
Discussion started by: SeenuGuddu
1 Replies

10. UNIX for Beginners Questions & Answers

Find and removing the old files and zipping the files using shell script

Hi, I am trying to removing the old files which were older than 10 days and same g zipping the files using the shell script. script was return as follows. find /jboss7_homes/JBOSS7/SKYLIV??/SKYLIV??_CRM/jboss-eap-7.0/standalone/log -mtime +10 -type f | xargs rm -f find /cer_skyliv??/log... (6 Replies)
Discussion started by: venkat918
6 Replies
PAM_ABL.CONF(5) 						 Linux-PAM Manual						   PAM_ABL.CONF(5)

NAME
pam_abl.conf - Configuration file for pam_abl PAM module. SYNOPSIS
Configuration file for both the pam_abl(8) PAM module, and the pam_abl(1) command line tool. DESCRIPTION
Syntax word ::= /[^s|/*]+/ name ::= word | '*' username ::= name servicename ::= name userservice ::= username | username '/' servicename namelist ::= userservice | userservice '|' namelist userspec ::= namelist | '!' namelist multiplier ::= 's' | 'm' | 'h' | 'd' number ::= /d+/ period ::= number | number multiplier trigger ::= number '/' period triglist ::= trigger | trigger ',' triglist userclause ::= userspec ':' triglist rule ::= userclause | userclause /s+/ rule Rule syntax Each rule consists of a number of space separated user clauses. A user clause specifies the user (and service) names to match and a set of triggers. A simple example would be *:10/1h which means block any user () if they are responsible for ten or more failed authentication attempts in the last hour. In place of the which matches any user a list of usernames can be supplied like this root|dba|admin:10/1h which means block the users root, dba and admin if they are responsible for ten or more failed authentication attempts in the last hour. You can also specify a service name to match against like this root/sshd|dba/*:3/1d which means block the users root for service 'sshd and dba for any service if they are responsible for three or more failed authentication attempts in the last day'. Finally you can specify multiple triggers like this root:10/1h,20/1d which means 'block the user root if they are responsible for ten or more failed attempts in the last hour or twenty or more failed attempts in the last day. Multiple rules can be provided separated by spaces like this *:10/1h root:5/1h,10/1d in which case all rules that match a particular user and service will be checked. The user or host will be blocked if any of the rule triggers matches. The sense of the user matching can be inverted by placing a ! in front of the rule so that !root:20/1d is a rule which would match for all users apart from root. It is important to treat root as a special case in the user_rule otherwise excessive attempts to authenticate as root will result in the root account being locked out even for valid holders of root credentials. The config file can contain any arguments that would be supplied via PAM config. In the config file arguments are placed on separate lines. Comments may be included after a # and line continuation is possible by placing a back slash at the end of the line to be continued. Here is a sample /etc/security/pam_abl.conf: # /etc/security/pam_abl.conf debug host_db=/var/lib/abl/hosts.db host_purge=2d host_rule=*:10/1h,30/1d user_db=/var/lib/abl/users.db user_purge=2d user_rule=!root:10/1h,30/1d All of the standard PAM arguments (debug, expose_account, no_warn, try_first_pass, use_first_pass, use_mapped_pass) are accepted; with the exception of debug and no_warn these are ignored. The arguments that are specific to the PAM module are as follows: host_db, user_db Specify the name of the databases that will be used to log failed authentication attempts. The host database is used to log the hostname responsible for a failed auth and the user database is used to log the requested username. If host_db or user_db is omitted the corresponding auto blacklisting will be disabled. host_purge, user_purge Specify the length of time for which failed attempts should be kept in the databases. For rules to work correctly this must be at least as long as the longest period specified in a corresponding rule. You may wish to retain information about failed attempts for longer than this so that the pam_abl command line tool can report information over a longer period of time. The format for this item is a number with an optional multiplier suffix, s, m, h or d which correspond with seconds, minutes, hours and days. To specify seven days for example one would use 7d. Note that in normal operation pam_abl will only purge the logged data for a particular host or user if it happens to be updating it, i.e. if that host or user makes another failed attempt. To purge all old entries the pam_abl command line tool should be used. host_rule, user_rule These are the rules which determine the circumstances under which accounts are auto-blacklisted. The host_rule is used to block access to hosts that are responsible for excessive authentication failures and the user_rule is used to disable accounts for which there have been excessive authentication failures. The rule syntax is described in full below. host_clr_cmd, host_blk_cmd, user_clr_cmd, user_blk_cmd These specify commands that will run during a check when an item switches state since its last check. host_clr_cmd and user_clr_cmd will run if the host or user is currently allowed access. host_blk_cmd and user_blk_cmd are run if the host or user is currentlybeing blocked by their respective rules. If no command is specified, no action is taken. Within the commands, you can specify substitutions with %h, %u and %s, which will be replace with the host name, user name and service currently being checked. If there isn't enough information to fulfill the requested substitutions (eg. running the pam_abl tool without specifying all the necessary fields), the command will simply not run. EXAMPLE
# /etc/security/pam_abl.conf debug host_db=/var/lib/abl/hosts.db host_purge=2d host_rule=*:10/1h,30/1d host_blk_cmd=iptables -I INPUT -s %h -j DROP user_db=/var/lib/abl/users.db user_purge=2d user_rule=!root:10/1h,30/1d user_clr_cmd=logger This is a pointless command! user: %u host: %h service: %s SEE ALSO
pam_abl.conf(5), pam_abl(1) AUTHORS
Andy Armstrong <andy@hexten.net> Chris Tasma <pam-abl@deksai.com> GNU
01/13/2010 PAM_ABL.CONF(5)
All times are GMT -4. The time now is 02:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy