Category Archives: Linux Tricks

How to Add an IP to a Linux Server

When you decide to rent a dedicated server, you almost in all cases get more than one IP address. This is used for DNS management and other stuff that is related to unique IPs. For example, you want to assign a dedicated IP to one of your site. Let’s take we don’t have any panel installed (like CPanel,… Read More »

How to Copy Files Between Servers via SSH Using Midnight Commander

If you are a system administrator, you should often need to copy files between servers. I think that the most useful tools for this is Midnight Commander (mc). I will show you how to establish a SSH connection to another server in this post. First of all let’s start midnight commander from command line by typing mc. If… Read More »

Finding Big Files With Linux Find Command

Finding files is a very common practice for all operating systems. I don’t think this is a trick. but it’ll be very helpful for newbies to know the exact command to find big files, especially when you don’t have enough space on your machine and want to know which files take most of your space. find / -size… Read More »

How to Restore a MySQL Database with Linux Shell

Today I will show a simple command that will allow you to restore a database from a previously made sql file. No matter, how the backup was done, if it has sql commands, you will restore it in the fastest possible way. If your database backup file exceeds 10 megabytes, it’ll be very hard to restore it using… Read More »

Two Ways to Exclude yum Updates

How often do you update your Linux server software? If you have chosen yum to do this for you, you should have some packages that aren’t really necessary for update; they can even cause yum errors. In order to exclude some packages you should use of two methods proposed in this post. The first one is to add… Read More »

How to Delete a Big Number of Files in a Folder – Linux Command

If you’re using temporary files you should notice that after some time it is hard to delete them as their number is growing. If you have many files and try to delete them with a usual command rm -f you should receive something like this: [root@server html]# rm -f * -bash: /bin/rm: Argument list too long What to… Read More »

How To Run a Previously Entered Command in Linux

Let’s say you’ve issued a long command and don’t want to type it again. I think you know that all linux commands entered could be shown by issuing history command. History outputs an ordered list of commands that were executed before by current user. In order to find the command you want, you should enter the following: history… Read More »