Skip to content

10.Linux(Find, Backup Script)

Agnivo102 edited this page Mar 21, 2026 · 3 revisions

find /home/agnivo/ -type f -name f01

find /home/agnivo/ -type d -name f01

If don't know the location.

find / -type f -name f01

Screenshot

Too many error messages as in root directory I don't have permission to view. So we will redirect all those error messages to a file.

find / -type f -name f01 2>null

Screenshot

The error messages are redirected to a file. 2 represent error messages and 1 represent all the values returned.

If only know the size:

find / -type f -size +500M: This will bring the files greater than 500 MB in root directory.

image

find / -type f -size -1M: This will bring the files leaser than 1 MB in root directory.

Uploading image.png…

date +%Y%m%d : Format for date to able to use a s a string.

Screenshot

Backup Script

Screenshot

Clone this wiki locally