Archive for the 'Tips' Category

Stopping God (Root) from Deleting File

You can make a File “immutable” or “unalterable” that it cannot be changed or deleted even by root. Note that this works on (ext2/ext3) filesystems AFAIK.
You can accomplish this by making a file “immutable” by using chattr +i filename command
From the man page:

A file with the ‘i’ attribute cannot be modified: it cannot be deleted [...]

Find How Many Files are Open and How Many Allowed

To find how many files are opne at any given time you can type this on the terminal: cat /proc/sys/fs/file-nr
I got this number:
6240 ( total allocated file descriptors since boot)
0 ( total free allocated file descriptors)
94297 ( maximum open file descriptors)

Not that you can check the maximum open file by using this [...]

Listing Open Sockets and Internet Files with lsof

lsof is a command meaning “list open files”, which is used in many Unix-like systems to report a list of all open files and the processes that opened them. We will look at ways to keep tab open sockets and Internet files with lsof.
To have a real-time tab on open sockets type in watch lsof [...]

Turn Off Unnecessary Services

People commonly overlook the fact that it is not just the desktops and servers that are potentially running unnecessary services—your network devices are also likely doing this. However, here is a list of services you should look for on your network equipment and turn off if you are not actively using them:

Cisco Discovery Protocol (CDP)

TCP [...]

Pages (38): « First ... « 24 25 26 [27] 28 29 30 » ... Last »