Sponsored Content
Top Forums UNIX for Dummies Questions & Answers find and delete a file in one command Post 302203594 by radoulov on Monday 9th of June 2008 09:49:06 AM
Old 06-09-2008
Quote:
Originally Posted by wewee
hi , let's assume i have a file that is located in the l*** directory and this file's name is t****_***s.php , how can i find this file and delete it using one single command ?????
You don't need to find it if you know where it is!?

Code:
rm /path/file

Perhaps you mean somewhere under the *** directory ...
 

10 More Discussions You Might Find Interesting

1. Solaris

How to delete Directory and inside files using Find command

I am using the following Command to delete Directory with contents. But this command is deleting inside files only not directories. is there any change need in my command? find -type f -mtime +3 -exec rm -r {} \; Thanks (3 Replies)
Discussion started by: bmkreddy
3 Replies

2. Solaris

Could not able to delete the files through find command need expert advice

Hi Gurus I am facing a problem, there is a folder called /a where there are lots of files which are occupying space anything between 30 GB to 100 GB as I am not able to check the space occupied by that folder through "du -sh /a" command as I don't see any output after more than 1 hour of... (4 Replies)
Discussion started by: amity
4 Replies

3. Shell Programming and Scripting

Find command to delete a pattern

Hi all i have a directory where it has files as shown below.Using find command how can i delete files which were modified more than 20 days ago and having the pattern jnhld15231 or jnhld15232. find ./ -name "jnhld15231^" -type f -mtime +20 -exec rm {} \; find ./ -name "jnhld15232^" -type f... (2 Replies)
Discussion started by: morbid_angel
2 Replies

4. Shell Programming and Scripting

wanted to find both link file and ordinary file using single find command

find . -type fl o/p is only the ordinary file. where in it wont give the link files. (2 Replies)
Discussion started by: nikhil jain
2 Replies

5. Shell Programming and Scripting

Find command to search and delete files older than 1 days at a desired location

Hello All, Can someone please help me out in creating the find command to search and delete files older than 1 days at a desired location. Thanks in advance for your help. (3 Replies)
Discussion started by: Pandee
3 Replies

6. UNIX for Dummies Questions & Answers

Find command to delete old files

Hi, I want to delete all the log files that was created on year 2008. My command is not working. Any idea? find . -name '*.log' -mtime 1460 -exec ls -lt {} \; Thank you. (2 Replies)
Discussion started by: samnyc
2 Replies

7. Shell Programming and Scripting

Find command to delete the files

Hi All, I've created 2 files touch -t 201309101234 aa10 touch -t 201309111234 aa11 Exact 60 days before from today date is SEPT 12th . As per the following command as i gave +60 means the files which were created before sept12th should be deleted find /etc/logs/*aa* -type f -atime +60... (5 Replies)
Discussion started by: smile689
5 Replies

8. Shell Programming and Scripting

Find if file is 45 min old if yes delete

Hello, we have process2(my_pro.sh) which check for the file Pr_rn_Chk (generated by other process1). The process runs every 15 min. if exist Pr_rn_Chk the process will exit. Else it will continue. I want to check if the file Pr_rn_Chk is older than 45 min delete the file. so that 4th run... (3 Replies)
Discussion started by: kumar30213
3 Replies

9. Programming

Bash script - find command with delete and exec

hi all, i have devised a script that starts in /restored/ and in there, there are a lot of sub folders called peoples names and in the sub folders are files/folders and it deletes the data in the sub folders BUT not the sub folder itself and it should then touch a file in all the sub folders... (3 Replies)
Discussion started by: robertkwild
3 Replies

10. Shell Programming and Scripting

Find and delete a certain HEX and its following value in a file

Hello there, I've been trying to do this half of the day and it's like I haven't come a single step further, so I hope you guys can help me with my problem: I have a text file that contains strings that should not be there and which I want to delete automatically from the command line. The... (4 Replies)
Discussion started by: surfi
4 Replies
args(1) 							   GNU Telephony							   args(1)

NAME
args - manipulate and output command arguments. SYNOPSIS
args [options] args... DESCRIPTION
This command is used to manipulate and echo command line arguments to standard out. This can include adding quotes around each argument passed or a separator, or to output each argument on a separate line. The program source also offers a basic example of how to use shell argument parsing and localization in ucommon. OPTIONS
--delim=char Set a deliminator character, such as ',', to use between each argument when outputing arguments. --directory If argument is a directory, list directory contents as arguments. --follow If argument is a directory and a symlink, follow symlinks recursively. --lines Output each argument on a separate line. --quote=char|pair Set a quote or special leading and trailing pair of characters to surround each argument with when output. A typical use might be --quote=() to surround arguments in parenthesis. --recursive If argument is a directory, recursively scan directory and any subdirectory contents as arguments. --reverse Reverse order of arguments. --help Outputs help screen for the user. AUTHOR
args was written by David Sugar <dyfet@gnutelephony.org>. REPORTING BUGS
Report bugs to bug-commoncpp@gnu.org. COPYRIGHT
Copyright (C) 2009 David Sugar, Tycho Softworks. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. GNU uCommon January 2010 args(1)
All times are GMT -4. The time now is 11:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy