You'll be happy to know that questons 1 and 3 can be addressed with the "find" command. It is a wonderful command. The find command has the following syntax:
find [-exec \;]
To list all files from the current directory downward enter:
find .
To find and delete all of the core files from the root directory throughout the entire file system type:
find / -name core -exec delete {} \;
On to your questions:
1) find files by name:
# find -name
find files by date: several possibilities:
find files by last accessed date where "n" in the example means periods of 24 hours in the past starting now, not starting at midnight this morning:
# find -atime
find files by the date that they were last modified where, again, "n" represents periods of 24 hours in the past starting now:
# find -mtime n
find files that are newer than a file named "testfile":
# find -newer testfile
find files with exactly a certain permission such as 770:
# find -perm
find files with at least a certain permission such as all files that have 7 in the owner field and any other permission in the other fields:
# find -perm -
find files with any of certain permission bits set:
# find -perm +
We might as well do question 4 here because we use the find command for those as well.
find files with SUID or SGID bits set:
# find -perm 6000
find files with SUID but not SGID bits set:
# find -perm 4000
find files with SGID bit but not SUID:
# find -perm 2000
find files with the "sticky" bit set:
# find -perm 1000
OK so that's questions 1 & 4.