1
vote
3answers
37 views

Is there a way to use > operator in find -exec

I'm trying to empty lots of files under a certain folder. >file or cat /dev/null > file or echo "" > file can empty file. find . -type f -exec blahblah {} \; can find files and do something ...
3
votes
1answer
309 views

How to find a file whose size is less than 10 MB?

I need to find a file in my current directory whose size should be less than or equal to 10 MB. ls -lh gives me the file size of each file but not sure how to find the files whose size are less than ...
2
votes
3answers
205 views

How can I find all files on a folder tree that have a none alpha numeric characters in it

I have taken over from someone else a lot of historic data. However the file names are totaly random and badly formatted IMHO. To start with I want to get a list of all files that contain spaces, or ...
0
votes
3answers
379 views

How to separately count number of files, directories, symbolic links and hard links within a single find run?

To check a successfull migration I'm using find to count the number of files, directories, symbolic links and files with more than one hard link. As the directories to check contain a huge number of ...
0
votes
4answers
4k views

Find file matching extension, then count files in the found directory

I am trying to search the filesystem for all files matching an extention (*.what), then count all files in the directory where it found the *.what files. The output should contain the directory name ...
1
vote
1answer
203 views

how do I write find expression (atime = ctime) (access time = change time).

I want to find a set of files to remove that have not been access since their last inode change. Files in which the last activity happened when they were moved into the directory they are currently ...
-2
votes
2answers
754 views

Can't find the path to proxy.pac file in OS X

I need to control my proxy.pac file in OS X, but I couldn't find it anywhere. I used whereis proxy.pac from terminal too — the whole story short: I want to find the path to a file in Mac OSX.
29
votes
5answers
41k views

Bash script to delete files older than x days with subdirectories

I'm trying to delete a ton of files older than x days. Now I have a script to do that find /path/to/files* -mtime +10 -exec rm {} \; But this will also delete the subdirectories. There are a ton ...
15
votes
2answers
4k views

Why is it so hard to find a file in Ubuntu?

It's very hard to find files in Ubuntu. In Windows, you could just go to C:\Program Files and you would find what you need. In Ubuntu, you must use search to find something you need. Maybe I am ...
2
votes
2answers
3k views

Find and remove all empty files

How can I search all empty files of non-root system and delete them?
3
votes
1answer
667 views

How to find one the latest modified file in directory and subdir?

How to find the latest one modified file by "find" command in directory and subdir ? I need take only one file.
1
vote
0answers
834 views

How to find files not accessed for the period of time without atime in linux?

Is there a way in the linux to find files which were accessed (read, write, doesn't matter) during computer boot and work? Or even better files that were NOT accessed at all during some time? I know ...
33
votes
4answers
37k views

How can I find files that are bigger/smaller than x bytes?

In a terminal, how can I find files that are bigger or smaller than x bytes? I suppose I can do something like find . -exec ls -l {} \; and then pipe the result to AWK to filter by file size. But ...
1
vote
3answers
2k views

Using sed to replace text from a list of files from find

Given the following find command: find . | xargs grep 'userTools' -sl How can I use sed on the results of that command? output: ./file1.ext ./file2.ext ./file3.ext
3
votes
2answers
304 views

Find files that have been accessed after they were created

With the find command it is easy to find files that have been modified or accessed within a given period. When a file is created, the acesss time is the same as the modify time. But as soon it is ...
4
votes
4answers
333 views

Windows XP: How to find the files with 2 characters only?

recently I found back door on my laptop. I t was generating many files with random names only 2-3 characters only. The most of them is empty. How can I find files only with 1 to 3 characters generated ...
3
votes
2answers
3k views

Windows XP find most recently updated files

How to find the latest created / accessed / modified files in the Windows XP OS ? I need it because some setup.exe copies some files and then it disappears without any trace, so I'd like to know what ...
0
votes
3answers
1k views

CMD Cannot find file, but it exists [closed]

I am trying to start an old DOS game (SimFarm) however it says that it cannot find the file. However the file is in the directory, and it exists. When I click on it, gives the same error. I tried ...
0
votes
6answers
2k views

A better way to search for a string within a file?

I am trying to find a particular string of text in a file somewhere on my hard drive. The best I have come up with so far is: find -type f / | xargs cat | grep "string to find" But this just tells ...