Here is a script to help you find empty directories located under a specified parent-folder. The file folders.txt contains the list of folders that are to be passed as input to the script. The script will now check all the folders mentioned in the file folders.txt, and give the list of folders that are empty.
This is a script to create a particular directory under all subdirectories in a parent directory. Consider the case when a parent directory consists of more than 100 folders and you want create a new folder under all these directories, with the same name. Doing this manually would be a mess. This script would help you do this in no time.
The function of the script is to rename a specific-directory present under all sub-directories of a specified parent folder. Consider, you have a particular folder under all sub-directories of a folder and you want to rename all of those occurrences. Doing it manually would take much time. Here is a script to make it easy for you.
- By sandeep.sasikumar on November 23, 2012 - 16:44
- Network Troubleshooting
Before we start counting the steps for troubleshooting, the first thing we have to do is, arrange networking components in a structured and systematic order. This will help us define the problem correctly and give us a clear idea about issues that happen regularly.
The few steps that are to be followed are:
- By sandeep.sasikumar on November 23, 2012 - 10:59
- Domain Name
The main purpose of a domain-name is to make the website simpler to access. It is easier for users to remember domain names rather than having to remember IP addresses of sites. But do you know that it would be quite useful to remember IPs when the domain name has expired? How would you access a site whose domain name has expired? Most people have no idea about this.
If you own a website then there is a good chance that you are using cPanel. cPanel provides an graphical user interface to manage a Unix based web hosting account for everyone involved in it. If you want to know how to create a new cPanel account in WHM then continue reading.
This is a common question asked by many cPanel/WHM users. Linux shell access is demanded by most web developers due to its advantage over the normal cPanel interface.
The command "setfacl" refers to Set File Access Control Lists and "getfacl" refers to Get File Access Control List. Each file and directory in a Linux filesystem is created with a specific set of file permissions for its access. Each user can have different set of file access permissions. The permissions can be set using the setfacl utility. In order to know the access permissions of a file or directory we use getfacl. The getfacl command displays the access permissions of files and directories with file name, owner, group and the ACL's(Access Control List). When we create a directory it is created with a default set of access permissions and by using getfacl we will be able to see the access rights.
”rsync” is an open source utility in Linux/Unix primarily used for synchronising files/directories over the networks. You can also use it to backup/copy folders between machines. It is particularly made use of to while administering servers connected to the internet. The term “rsync” itself refers to “remote-synchronise”.
- By anoopjohn on July 30, 2012 - 23:06
- Linux Shell
When you untar large tar files even as the root user on your VPS you might run into the error "Cannot change ownership to uid NNN, gid NNN: Disk quota exceeded". This is because the extracted files from the tar archive is being attempted to be created with the original UID and GID as on the system where the tar archive was created. Now if the UID is not already present on the new VPS or if the UID corresponds to a user without a lot of disc quota available the above error will be triggered preventing extraction of the tar.gz archive.
- By sandeep.sasikumar on July 30, 2012 - 22:46
- BASH Scripting
Most of us must be familiar with the names 'dig' and 'whois'. If not, these are two commands used to find the details of domains. You just have to type in dig domainname or whois domainname to get a comprehensive set of info on the domain.
What if you have not just one or two domains to check about. How about a 1000 domains and you want to know the details of each?
- By vimal on July 27, 2012 - 16:23
- Project Management
Redmine is one of the most popular Ruby on Rails applications which has made quite a name for itself in the world of Project Management. It offers a lot of flexibility. One of its main advantages is that it can recognize your files repository and can work along with your source control system to keep track of all changes through the tracker itself.
Here is one error that we came across when we tried to integrate our filesystem and source control management system with Redmine - Error: The entry or revision was not found in the repository
Some times we wish to exclude some files and directories when we try to take backup of a website. With tar it is possible. Use the --exclude option. For example, if you want to exclude .git folder and the imagecache directory inside the files folder, use the command:
tar -zcvf abc.com.tar.gz --exclude ".git/*" --exclude ".git" --exclude "sites/default/files/imagecache/*" --exclude "sites/default/files/imagecache" public_html
Most linux users are aware of the basic Linux terminal commands such as cd, ls, rm, rmdir, mkdir etc. Now let us take a look at some other commands which will help you make the best of the linux shell/terminal.
In every operating system, there are a lot of tasks that need to be scheduled to run at a particular time - some, very often (as in, every 5 minutes), and some, less (like, once every month).
For a quick example, you might want to run a temporary files deletion operation at midnight each day - this is where you need to write a cron job.
Crontab and Cron jobs are Linux’s version of a complete job scheduling system.
Let us see these in detail.
- By sandeep.sasikumar on July 12, 2012 - 23:46
- Linux Shell
Generating SSH keys and using them for connecting to SSH servers is a straightforward process on Linux. But for Windows users, Windows does not provide any support for the SSH protocol by default. There is no SSH client that comes by default on Windows. Let alone generating keys.
- By nitheesh.cs on July 10, 2012 - 16:38
- System Administration
Unlike proprietary operating systems that comes up with a rudimentary set of applications, Ubuntu and GNU/Linux in general has thousands of freely available Free Software applications available for installation directly from the Internet. These applications are usually available from software archives referred to as repositories. The official Ubuntu repositories contain more than 30000 applications. Having the Ubuntu repositories on DVD can be useful for those users who don't have access to the Internet or has only limited connectivity from the machine where they have their Ubuntu installed but have access from somewhere else to download the repository. Here is a step by step instruction on how to download the complete Ubuntu repositories and build your own set of Ubuntu Repository DVDs. For those who would like to get it done the easy way you can buy a set of Ubuntu Repository DVDs via our RequestCD program
- By nitheesh.cs on July 6, 2012 - 14:55
- Precise Pangolin
Ubuntu 12.04 comes with a bug that it will not mount the cdrom on proper path and that prevents installation of applications from the Ubuntu Repositories even if you add the repositories via apt-cdrom successfully.
Whenever you try to install applications you'll get an error message like
E: Unable to stat the mount point /media/cdrom/ - stat (2: No such file or directory)
Here is how to fix this problem:
- By sandeep.sasikumar on June 7, 2012 - 18:43
- Drupal Hosting
A VPS lies somewhere in between shared hosting and dedicated servers in terms of the features it provides. VPS divides the server’s primary resources and gives you certain amount of diskspace, memory, processing speed and bandwidth, with freedom on the OS configuration.
md5sum stands for message digest version 5, which is used to check file integrity whether the transferred files are corrupted or not. md5 is a command line utility used in both LINUX or MS-DOS/WINDOWS which generates and verifies message digests using the md5 algorithm. The md5 hash comparison detects changes in files that would cause errors. The possibility of errors is proportional to the size of the file. The possibility of errors will increase with the increase in size of the file.


