![]() So, instead, we can use Wildcards to filter a. (unpunctured): " p_ext2 echo -en "\nFound files:\n" find $p_path -type f -name "*.$p_ext1" find $p_path -type f -name "*.$p_ext1" -exec sh -c '\''mv "$1" "$ \ echo -en "\nChanged Files:\n" find $p_path -type f -name "*. But, sometimes, we have a list with several files, and we dont want to specify all of them on the command. 1 This question is a duplicate of How can I recursively find all files in current and subfolders based on wildcard matching EvgenKo423 at 16:54 Add a comment 10 Answers Sorted by: 947 find 'directory' -type f -name '. This will remove files which have last modification time higher than 7 days. set rotate high enough, to cover number of log files to keep (at least 7, if there will be one 'rotated' log file a day, but you can safely set it very high like 9999) set maxage to 7. Convert a Windows bat file to Linux sh shell script. bashrc alias find-ext='read -p "Path (dot for current): " p_path read -p "Ext (unpunctured): " p_ext1 find $p_path -type f -name "*."$p_ext1'Īlias rename-ext='read -p "Path (dot for current): " p_path read -p "Ext (unpunctured): " p_ext1 read -p "Change by ext. use missingok to let logrotate cleanup to happen. If you are using windows 10 and the file extension does not appear when you are browsing go to.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |