Hi, today I want to post a small script to copy files and directories and add a specific owner to a folder. I did this script myself and I am fairly new to python, about 6 months of experience. If you think it should be changed or has issues, please let me know so I can improve it.
To achieve my objective I have used a few standard libraries that come already with any major python distribution (`os`, `shutil`, `pwd`, `grp`; I will talk about those in a bit more details afterwards). Then I created a function `copy_files`. This function can receive the source files path, the destination, owner and space, this parameters are used to copy the files set owner and show the results. In this function I use recursion as this is a classic recursion problem, I will come back to this further on this post. The last part of the script checks is the destination exists actually calls copy_files function. This is the code: Continue reading
ctime, mtime and atime; find command
ctime, mtime and atime are very useful commands when dealing with time related search commands in the linux Family of operating systems.
This post is about how to use them in
a simple but yet very powerful way. Let’s get to it:
Let say you want to find all files in a folder that follow/fulfill the following criteria:
- the folder is /vat/lib/mysql/data
- The file name contains: mysql-bin.
- The files are younger than 2 days.
In other words find all the mysql binary log files that are not older than 2 days. Continue reading
Hosting network services services and websites basics
Hosting network services and websites or blogs like this one is now a days a regular task of anyone who want to conduct a successful business. This is non written a requirement for many other activities as well. If you are not an ICT professional and you have a website or need to deploy some services in your business and you wander where to store them and how. Then this article is for you.
More people than you might think want to get a server at their home or office and host their own websites and services locally. I am not 100% against this type of solutions, but the truth is the all the odds now a days are against it unless you have a particularly special need to have it locally. Let see what are the drawbacks. Continue reading
Website development projects
Having a good Website is very important for modern business, so some of the last projects that I have been doing lately are related to website development. For instance one of them were done for Team Engineers (Pty) Ltd, Botswana. They already had a website, that needed a platform easier to edit and manage as well as a new look to certain extend and some interactive features. Team Engineers defines itself as follows.
“TEAM Engineers (PTY) Ltd. is a specialist prefabricated accommodation solutions provider. Since its establishment in 1997, TEAM has gone from strength to strength not only in capacity and knowledge, but also in diversity of the product range and our level of service.”
They are the biggest company in Botswana in the business with a very well gained reputation of great quality solutions, for diverse purposes like: accommodation, mining facilities, schools, hospitals, offices, housing, etc. Please check out the next slider for some basic details about the look of the current website.
[metaslider id=1293]
The anti DRM day is coming
DRM Blast e-mail from defective by design:
“It’s two days before the International Day Against DRM and our community is kicking into gear. We’ll come together as a strong movement and we’ll make sure the world hears our message: Digital Restrictions Management is wrong, and we will not sit idly by while it’s imposed on us. Continue reading
Fedora Linux review & personal experience.
Good day, today I am going to talk about Fedora Linux, I can not say I am a great Fedora expert. I have been following the project for a while. but I have decided to install the workstation just a few days ago. My main experience is with Debian based distros, Mint, Ubuntu. I kind of know the system, I have been working with it for around 8 years as developer, network administrator, consultant and enthusiastic. I love Linux, but redhat was never an option for me, and it’s not an option at least for server. I am going to talk about Fedora, the workstation. Fedora is a Red hat based system, well actually fedora is the testing red hat, and in any case they are the same family. I my case this is what happened.
I have a laptop ASUS X750J; it’s a very good laptop for my personal needs. It has a core i7, 6Gb or RAM, 750 HDD. The thing is, even with my experience I never managed to configure properly any of my favorite Operating Systems; as I said Debian, Mint or Ubuntu. So I started looking around for options, I decided to try Fedora 21. The experience is amazing, everything worked from the start.I did not even had to modify a single configuration.
Web hosting administration software free alternative.
Hi, have engaged myself on a quest to look for an administration panel for my customers hosting. I want a good one to have it as an alternative to
cPanel, the truth is that every day I like the cPanel project less and the free alternatives are getting better. So unless you are committed for some MAJOR reason to cPanel I would not recommend it any more. Use any other GLP like thing from out there, if the problem is support get better support from one of the communities. Continue reading