Skip to content

Tag: command-line

Adding server hostname to each line of ‘find’ output

I am in need of a listing of all files with a specific extension on a server. I need it to show the server hostname, file size, and absolute path of the file. or Almost get me there: joes_server 5473 /home/joe/pics/sunset.jpg 8522 /home/joe/pics/mountains.jpg I cannot figure out how to include the hostname on…

How to list recently deleted files from a directory?

I’m not even sure if this is easily possible, but I would like to list the files that were recently deleted from a directory, recursively if possible. I’m looking for a solution that does not require the creation of a temporary file containing a snapshot of the original directory structure against…

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…