Using Linux find and rm commands
I want some help to fun find and rm commands on Linux based servers. I just ended up my studies and landed upon an temporary work of configuration Linux servers. There are ample of empty directories I found my self. There are very less chances of me to work on gui mode due to some restrictions. So for that I found that this must be a much helpful options. What you recommend me before running those commands. Are there any kind of negative impact.
Re: Using Linux find and rm commands
There are some points on the same that I want to share out. For that to run these commands from the shell of GNU Linux you must open a Terminal window. This only works when in you are in graphics mode. Many of these commands require superuser root, so you will need to be logged with the user to operate. Some of these commands do not appear on certain distributions of GNU Linux. Some of the commands shown here are specific to one or more GNU Linux distributions.
Re: Using Linux find and rm commands
Yes to work with the commands on Linux whatever they are you need to follow out some stuff. Some of the departures of running some shell commands GNU Linux may be different on different distributions. So that you have to take care in case of error. There are some commands that can be dangerous. So It is desirable to run only those commands which you know and you must also know what will be the impact of the same.
Re: Using Linux find and rm commands
It is correct to say that sometime when we pass on some commands without much knowledge can severely effect our systems and ata. Like the command rm-f-r-v folder name, delete all folders and subfolders from the folder foldername without prompting. In the same way the command halt off the computer without prompting, if a computer in a normal user there is no problem, but if it is a database server, web, etc. it paid services will not work. You must carry out necessary precautions.
Re: Using Linux find and rm commands
Use the rmdir command followed by the name of the directory you want to delete. Suppose you have a directory called abc which is inside a directory called html. First we would have to put in the html directory with the cd command, used to change directories. Then we do the command: rmdir abc. This command does not prompt for confirmation if you want to delete the directory. But do not delete if the directory can have any content within, so you first have to erase what might be in mydir.
Re: Using Linux find and rm commands
All you have to take into account is whether the user you want to delete the directory has the necessary privileges to delete it because if the user is not authorized. If you really want to delete the directory and you know that the directory is not empty and that this information does not interest you can use the following command rm-rf directory, be careful with this command because you do not ask for confirmation. The rmdir command is used to remove empty directory.