Sometimes you want to end a process in Ubuntu, but have no idea what the process number is – alternatively you may be writing a script where the process ID is obviously going to be dynamic. Here’s a quick guide to ending a process by its name via command line:
Some services has slightly obscure names, for instance if you’re running a test server with skip-grant-tables version of MySQL it’ll be called mysqld. You’ll want to check and make sure you’re killing the correct process
This shows you a list of all the services running. If that’s a little too much, narrow it down a little. Grep will display all processes containing the string searched. The service mysqld will show up in this Grep search:
ps -aux | grep "mysql"
Now that you’ve got the correct name out of the service list you can use the killall command properly like so:
killall -v mysqld
run ps again to double check that it’s been killed properly.
If your Cron is a wget command you’ll need to set it so that it “gets” only one time irrelevant of the http response. Wget will re-attempt a connection until it receives a 2XX response. It’s possible under some CMS that you’ll have jobs that run from a Wget’d page.
The correct syntax for using a Wget only one time is:
0 * * * * wget -t 1 "http://example.com/wget/command.html"
This tells the Wget command to only get the page one time. If your page is dynamically generated it can take longer than the minimum response from Wget, at which point the Cron will appear to run a second time (and a third, fourth, fifth, until your server is overloaded).
The first 5 characters are time in Minutes, Hours, Days, Weeks, Years. The above example runs on the hour every hour of every day, every week, every year.
This one’s quite simple, but is often forgotten. The syntax for copying from one directory to another in Ubuntu is:
cp -a /path/to/source/folder/. /path/to/destination/folder
The -a keeps the file attributes and symlinks, the period at the end of the source folder makes sure that you get hidden folders too (important for .htaccess/.htpasswd files).
If your directories have high level access privileges you might need to use the sudo command to enact root privileges.
January 2014 – Present
I am currently the joint owner of Technical Jelly Ltd a software/server engineering company providing consultation and development services to SMEs and Enterprise level businesses, as well as third party support & overflow development services to software companies throughout the UK and Ireland. The company specialises in LAMP stack server & application management/optimisation, Web & Graphic Design, and general software engineering. I’m a RackSpace certified partner, but also have the ability to work in the Azure environment depending on our client requirements.
August – October 2013
Redesign and redevelopment of the First4Websites flagship website in line with the final stage of rebranding from First For Websites Ltd to First4Websites.
The site was a team effort, including input from all members of staff including the named members above, Laura Thompson, Sheila Nicholson, Reece Vail, and Corinne Spencer. Outside consultancy was offered from Mike Jobson from Oxford Innovations.
The site is designed and built using cutting edge CSS and HTML techniques in order to fully showcase the companies capabilities and rigid commitment to future development. The site uses CSS3 and HTML5 and is based on a stripped back of the WordPress CMS, and was designed to reflect that First4Websites, though being based in the countryside, has an infinite amount of inspiration and in-house design talent
September 2012 – Dec 2013
A flagship project at First4Websites to provide a unified portal for Berwick-upon-Tweed. The key aim of the project is to use the Design, Development, SEO, online marketing and sales experience within First For Websites to generate a modern user-friendly website to promote Berwick to locals and tourists alike.
January 2013 – April 2013
Website to promote the services of Event Support Services Northumberland. The project required significant, and on-going, SEO, and is a somewhat rudimental implementation of WordPress with standard plugins.
February 2013 – April 2013
Creation of a website to promote and market Weeks Foods unique vegetarian alternatives to meat products, ready-made eggy bread, and Zambian Honey. The site uses a variety of WordPress plugins and bespoke JQuery functions to create an individual brand for an up and coming foods manufacturer.
The site is fresh, colourful, and provides a single portal for users to view the Weeks Foods brand. The site also has associated managed email accounts, and some Apache2 optimisations specifically for the large amount of image loading per page.
October 2012 – December 2013
Farmstock Scotland required an update to their website. The site needed to serve several functions, from an end-user editable brochure, all the way through to a cattle and sheep market. The site also contains a weekly newsletter breakdown of the current state of farming in Scotland, as well as a quarterly update on Farmstock itself.
October 2012 – Dec 2013
Creation of a website to help promote and market specific services for OH3, a national Occupational Health provider. The site was originally created to be a brochure of services, but has since become a location for their clients to log in, and submit secure content.
The project also carries a large SEO campaign, and Google AdWords campaign targeted at increasing business for OH3.