Tag Info

New answers tagged

2

I don't know if what you want to do is possible with find, but you can speed up your current use of find considerably if you use find | xargs instead of find -exec.


1

In essence this is the problem; directory from which you are doing the find is symlink; so relative move .. is not moving you to where you would expect; rather to .. of $(readlink -f $PWD) moo:~$ mkdir foo bar moo:~$ cd bar/ moo:~/bar$ ln -s ../foo/ moo:~/bar$ touch w00t moo:~/bar$ ls -1 foo w00t moo:~/bar$ cd foo moo:~/bar/foo$ ls -1 ../ bar foo cool ...


2

Those files were rotated, and during the process their ctime changed. Every time you touch a file or change it contents you're going to modify it's timestamps which will overwrite old ones. This will mislead your find command. ls listing shows mtime; since this is what ls shows by default unless -c (ctime) flag is specified So in essence; your ctime ...


1

rsync --progress --files-from=<(find /src_path-mtime -3 -type f -exec basename {} \;) /src_path/ /dst_path


2

This boils down to file system and procfs tuning. What you explain as 'high' load is situation where other normal processes on system are starved from reads and they forced to wait. Situation is characterized by high share of CPU wait time (check top %wa) many processes in D state (uninterruptible sleep due to waiting for reads from disk) Using noop ...


2

It makes no sense to try to keep the load low at all costs. What is important is that your process steps back if something more important needs to make use of the resources offered by your system. ionice and nice / renice can be used to reduce the priority so that it only runs when the system is otherwise idle.


1

As I am sure you know, a directory is a special type of file in the UNIX paradigm. To determine whether something is a directory or another type of file, it must be interrogated, and fstat() is a good way to do this. I believe later filesystems and fs-drivers keep a separate table of just the directories, but the find command dates back decades, and is ...


4

Yes, it looks like it really is the case that find is using fstat to determine the type of the file. This is mildly surprising given that dirent has contained the information since kernel 2.6.4. Not all filesystems have support for the extended dirent behaviour so either this is true in your case or find doesn't use it. Without knowing your filesystem type ...



Top 50 recent answers are included