The permissions can be specified using letters r (read), w (write), x (executable). We can also use the letter a to represent all three of these categories. In the following examples, we use symbolic notations such as u ( for user), g (group), o (others). rw-r-r- 1 david david 1732 Nov 27 23:53. Find files based on their permissions using symbolic notation. conf.The next example will find all files with extension. For example we only would like to search for a specific text/string within configuration files with extension. Using grep command it is also possible to include only specific files as part of the search. rw-r-r- 1 david david 1175 Nov 25 23:15. Include or Exclude specific files names from search. as written, you are searching for the word date in two different files. rw-r-r- 1 david david 1375 Nov 20 16:14. If you need to add space delimited fields in date command use double quotes around (). An easy way to date-sort the files is simply to use find in command substitution as the argument to ls -t (along with any other options to ls you may desire), e.g.: $ ls -lrt $(find. If you need to count the files, just pipe the output to wc -l as phatfingers shows in his earlier answer. Of course the '\' is simply a line continuation character used to split the line between the date tests so it doesn't generate a horizontal scroll-bar in this answer - you can omit it and put everything on one line. ! -newermt " 00:00:00" and not modified after the last second in November.-newermt " 23:59:59" files modified after the last second in October.-type f limits the find to 'files' not 'files
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |