Skip to content

Instantly share code, notes, and snippets.

@ederrafo
Last active January 14, 2021 02:14
Show Gist options
  • Select an option

  • Save ederrafo/b6d7bec23bc5c363812d8f5d51cd95d3 to your computer and use it in GitHub Desktop.

Select an option

Save ederrafo/b6d7bec23bc5c363812d8f5d51cd95d3 to your computer and use it in GitHub Desktop.
linux unix command find search
find . -iname "my-file"
find . -not -name "my-file"
$ sudo find / -name "version.sh"
$ sudo find / -name "tomcat7"
$ sudo find . -name "*tomcat*"

Listar archivos por un determinado rango de fechas con su detalle

find . -newermt 20190101 -not -newermt 20200101 | xargs ls -l

Borrar

find . -newermt 20190101 -not -newermt 20200101 -delete

find . -maxdepth 1 -mtime +450 -type f -print

Un dia antes

find . -maxdepth 1 -mtime -1 -type f -print
find /tmp -maxdepth 1 -mtime -1 -type f -name "DBG_A_sql*" -print

How to move the files based on Year

https://unix.stackexchange.com/questions/73268/how-to-move-the-files-based-on-year https://lamiradadelreplicante.com/2017/05/14/buscar-los-archivos-modificados-en-un-intervalo-de-tiempo-con-find/

https://unix.stackexchange.com/questions/302011/finding-and-deleting-files-with-a-specific-date

https://www.hostinger.es/tutoriales/como-usar-comando-find-locate-en-linux/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment