General :: Find A File And Just List The Found Files?
Aug 7, 2009
I use find / -name myfile to search files. But it will print out a very long list such as follow:
Code:
...
find: /var/empty/sshd: Permission denied
find: /etc/audit: Permission denied
find: /etc/httpd/conf/ssl.crl: Permission denied
find: /etc/httpd/conf/ssl.crt: Permission denied
[code]....
View 4 Replies
ADVERTISEMENT
Dec 25, 2009
I need to delete all *.trc files that are older than 30 days and I am getting a "Argument list too long" error. There are other files that should not be deleted which is why I am using the "*.trc" and newer files need to be kept as well. I have seen other postings but they do not cover both of the conditions. Below are 2 of the many attempts at doing this but I cannot get this to work.
find *.trc -mtime +31 -print| xargs rm -f {}
find *.trc -mtime +31 -print -exec rm -f {} ;
View 3 Replies
View Related
Oct 5, 2010
I know I can do find . -type f, but that includes binary file and I couldn't find a way to exclude them with find
View 4 Replies
View Related
Jan 31, 2011
How to find and list files and directories present the current directory which were created in, say, years 2005, 2006, and 2009 and then move them to some other location, for example, /backup. Yes, I need to list them and move simultaneously. We can use:
Code:
find . -mtime n {};
but that n is troublesome for me to figure out files/directories created in years 2005, 2006, and 2009, for instance. Is there any way to match exactly by Year Value rather than calulating the "n" (days * 24 Hours)?
System Info:
SunOS 5.8 Generic_117350-06 sun4u sparc SUNW,Ultra-Enterprise
View 3 Replies
View Related
Jul 2, 2010
How can I find a list of files that are named duplicates i.e. have same name but in different case that exist in the same directory?
View 7 Replies
View Related
Dec 7, 2010
I was using the following command to search for tmp files older than 15 days for deletionI used "ls -l" first just in case
Code:
find somedirectory/ -type f -ctime +15 -exec ls -l {} ;
then i noticed that occasionally i get a "No such file or directory" error
When I looked at the directory, the file was not there.How does "find" find a file that doesn't exist?Is it possible that the file can be deleted right at the moment after a file is found and before the command executed?
View 3 Replies
View Related
Feb 23, 2010
I've got a simple command that does almost what I want.
The following will locate all files with a suffix of '_compressed.swf' and copy each into its same directory with a '.bak2' appended:
However, I need to replace '_compressed.swf' with '_content.swf' I'd like to use find, rather than recursive flag on cp for consistency.
Objective
In: /content/somefile_compressed.swf
Out: /content/somefile_content.swf
View 3 Replies
View Related
Aug 12, 2010
I'm trying to do a
find /photos/* -type f -mtime +365
to find all my pictures that are over a year old, but I keep getting argument list too long. How can I view what all the results are, even if it just dumps it to a file that I have to open?
View 12 Replies
View Related
May 27, 2011
find /var/spool/mqueue -group abc -exec rm -rf {} ;Using above command , I delete all the files belong to group abc.Now the problem i face is that the this command gives error that some files are missing . And this error occur because after creating list of files, it pass that list to rm -rf but till that time sendmail process queue and some of files disapper from /var/spool/mqueue.
View 5 Replies
View Related
Sep 11, 2010
I have hard drive with several thousand photos. These photos are in different formats, some are tif some jpg some raw (cr2). These files are in dozens of directories. What I want to do is produce a list of all the files, in all of the directories, sorted by the file name (not sorting on the path), listing the location, file name, size and date created.
For instance I may have a file called photo1.jpg in /photos/pics/
I may also have a file called photo1.cr2 in /photos/misc/ and a file called photo1.tif in /photos/processed/summer/.
I would like a text file that would look like this:
/photos/misc/photo1.cr2 2536658 2010-07-09 13:17
/photos/pics/photo1.jpg 320046 2010-07-07 14:47
/photos/processed/summer/photo1.tif 234456689 2010-07-10 09:22
Of course I want it to do this for all of the photos. I pretty sure that there is a way to do this with a minimum amount of work. I have no problem with using the command line.
View 3 Replies
View Related
Apr 23, 2010
How to find continuously growing files in the file system?
View 11 Replies
View Related
Dec 21, 2010
i'd like to know the total filesize of all files found with the find command, so
Code:
find -iname '*.mpg' | xargs -I {} du -sh {}
but this gives me the filesize of each file, since each line is passed to "du".
how can I pass the whole list through the pipe?
View 6 Replies
View Related
Mar 27, 2011
I need to find the list of file being tagged by user jack starting from a given date.Eg:Tag Name:lcc_dev_p1User: jackDate: >= 2011-03-02can some done tell me what is the cvs command for this.Should the below command give the correct outputcvs log -R -S -N -rlcc_dev_p1 -d">=2011-03-13" -wjack > /tmp/output.txt
View 1 Replies
View Related
May 18, 2011
How to manage the find command to return true or false if a file was found/or not? I tried to man find but didn't found anything.
View 12 Replies
View Related
Sep 23, 2010
When i try installing anything i get errors, for example when i try to install somthing from ubuntu software center i get this.
Code: installArchives() failed: Preconfiguring packages ... Preconfiguring packages ... Selecting previously deselected package ttf-symbol-replacement. (Reading database ... dpkg: warning: files list file for package `libsdl-image1.2' missing, assuming package has no files currently installed.
[Code]....
View 4 Replies
View Related
Aug 13, 2010
I am trying to compare a list of patterns from one file and grep them against another file and print out only the unique patterns. Unfortunately these files are so large that they have yet to run to completion. Here's the command that I used:
Code: grep -L -f file_one.txt file_two.txt > output.output Here's some example data:
Code:
>FQ4HLCS01BMR4N
>FQ4HLCS01BZNV6
>FQ4HLCS01B40PB
>FQ4HLCS01BT43K
>FQ4HLCS01CB736
>FQ4HLCS01BU3UM
>FQ4HLCS01BBIFQ
how to increase efficiency or use another command?
View 14 Replies
View Related
Jun 30, 2011
I want a list of all my mp3 files (or any other kind of file, actually) telling me HOW MANY OF THEM I have in my computer.I tried with both find and locate commands in terminal, but they don't tell me how many files I have.
View 2 Replies
View Related
May 18, 2011
shell scripting in Fedora14I want a script"Find in curent folder for files, and it copy first file he find with name gived by user, if name already exist then echo error message and finish"command usage " bash scriptname copyASname"
smthing like Code: #!/bin/bash
for files in /home/user/*
do
[code]....
View 1 Replies
View Related
Jan 6, 2010
I've got a new hard drive, formatted it to ext3, and made a check for bad blocks using e2fsck.
It gave me this:
Quote:
I just would like to know where i can find how many bad blocks were found (perhaps one if it is using singular in sentence "Updating bad block inode."?), and what is/are the number(s) of located bad block(s).
View 3 Replies
View Related
Nov 13, 2010
I downloaded rpm so far but my only problem is I don't know what apps there are for it?
View 14 Replies
View Related
May 12, 2011
I want to search in many many files for a string.
I used find /archive/* -print0 | xargs -0 grep 'robert' -sl
Is there a simple method to do it ?
View 2 Replies
View Related
Jan 30, 2011
Code:
sudo apt-get upgrade
Lots of text (Reading database. dpkg: unrecoverable fatal error, aborting: unable to open files list file for package `grub-common': Input/output error E: Sub-process /usr/bin/dpkg returned an error code (2)
View 6 Replies
View Related
Apr 13, 2011
I realise KPDF is quite old now but as this issue may recur when I move to a newer distro (well, newer than Hardy) with Okular I thought I'd better ask.I use Gnome, but prefer KPDF to evince when viewing PDF files. However, KPDF's "Open Recent" list behaves very oddly - there's no apparent way to clear it, and items which were on the list one day aren't on it another day (coinciding with old items reappearing on the list).
Is there any way to clear this list?Similarly, is there any way to clear the list of recently opened files in the "Location" drop-down box in File-Open? (which also seems to mysteriously lose list items inbetween reboots).
View 1 Replies
View Related
Dec 1, 2010
Whenever I try to install or remove a program, I get the following error
Code:
dpkg: warning: files list file for package `libavahi-common-data' missing, assuming package has no files currently installed.
dpkg: warning: files list file for package `libgtk2.0-common' missing, assuming package has no files currently installed.
dpkg: warning: files list file for package `libxres1' missing, assuming package has no files currently installed. (Reading database ... 55%dpkg: unrecoverable fatal error, aborting: files list file for package 'ubuntu-mono' is missing final newline E: Sub-process /usr/bin/dpkg returned an error code (2)
View 4 Replies
View Related
Sep 11, 2009
I am trying to do a find/grep/wc command to find matching files, print the filename and then the word count of a specific pattern per file. Here is my best (non-working) attempt so far:
wc `find . ( -name "*.as" -o -name "*.mxml" ) -exec grep -H HeightResizableList {}` ;
View 10 Replies
View Related
Jul 15, 2011
Is there a way to specify to find that I only want text files (and not binary files)? Grep has an option to exclude binary files, so I thought find probably has a similar feature, but I've been unable to find it.
View 2 Replies
View Related
Jun 24, 2011
Where can i find a list of cronjob return codes for linux/unix
View 1 Replies
View Related
Mar 17, 2011
Where would i find the list of distribution codes.For example.Code:samba-32bit-3.4.2 -1.1.3.1.x8664.rpmIn above rpm file it is indicated that its release is 1.1.3.1 .The rpm is meant to be run for opensuse.Where would i get the linking of release number and In simple words How would i guess distribution by merely looking at rpm name?
View 2 Replies
View Related
May 11, 2011
command to find list of table spaces in oracle in unix
View 1 Replies
View Related
Jan 25, 2009
I know how to search for normal files but can you let me know " How to search for 5 setuid files on the system. Also explain, for each file, why setuid mechanism is necessary for the command to function properly"
View 1 Replies
View Related