Author Archives: TY

How to find files that was last accessed 12 hours ago ?

Each file in Linux  has three time stamps, which record the last time that certain actions were performed on the file:

[a] access (read the file’s contents) – atime (days) OR  amin (minutes)
[b] change the status (modify the file or its attributes) OR ctime (days) / cmin (minutes)
[c] modify (change the file’s contents) – mtime (days) OR  mmin (minutes)

  • -amin +720 means you are looking for a file accessed 12 hours (720 minutes)  ago.
  • -amin -720 means less than 12 hours (720 minutes).
  • -amin 720 If you skip + or – it means exactly 12 hours (720 minutes).

# find /home/* -iname "*.mp4" -amin -720

How to Delete All admin Tickets (Messages) from Directadmin

To delete all the admin messages (tickets) from direct admin control panel:

  1. Goto this folder /usr/local/directadmin/data/tickets
    # cd /usr/local/directadmin/data/tickets
  2. Delete all the folder content, which is the messages
    # rm -Rf *
  3. Clear up the messages database file
    # echo "" > /usr/local/directadmin/data/admin/tickets.list

All messages should be cleared now, mostly those messages are from the brute-force attack logs, if you don’t mind about such messages you can disabled this feature in DirectAdmin control panel.

To achieve that, from the DirectAdmin Panel -> Extra Features, click on Administrator Settings and choose No for the Security Option Parse service logs for brute force attacks