Skip to content

Tag: find

Find filenames with variable number of characters

Using Ubuntu. I have a directory, with some sub directories, which may have some files with names formatted like this: So, they all start with ‘core’. then a process name, then the PID number, which is usually 4 or 5 digits. My Python based tool uses two ‘find’ commands to find them, l…

Change file names by Perl [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 7 years ago. Improve this question How t…

bash script – executing find command gives no output

I’m a total noob at bash so this is most likely a syntax error, but I could not find anything that worked for my syntax in my searches. From terminal, running find . -name “*g*” results in However, running this bash script called grepdir.sh from terminal as grepdir.sh . “*g*” res…

How to find newest files with a certain name?

Suppose I have a directory with many files of the same name in subdirectories (for example, comes up when keeping BibTeX files for multiple academic papers). What’s the best way to find the newest version of a file with a given name? I’ve come up with the following command which lists all the file…

crontab not working under arch linux

I tried to set up a schedule to remove the old file and folder after several days. I put the following code in a script file and tried to use crontab to run it every day. The find command worked fine. but the crontab seems not execute the script file. I also use crontab for other tasks, i.e. rsync, they