Find files that are created more than 7 days and delete them using bash

Filed Under (linux) by admin on 18-01-2012

Here we will use the find -mtime and xargs commands

Complete script:

find '/home/user/data/' -name '*.txt' -mtime +7 | xargs rm

Explanation:
find -mtime displays files made based on given number of days

find '/home/user/data/' -name '*.txt' -mtime +7

xargs captures the result of a previous command and pass it as an argument for another function

find '/home/user/data/' -name '*.txt' -mtime +7 | xargs rm

The result of the find command is passed to another function rm which then removes the files

Ubuntu certified laptops and hardware for 10.10 and 11.04

Filed Under (linux) by admin on 14-11-2011

Tagged Under :

Check if your laptop is fully compatible with ubuntu

http://www.ubuntu.com/certification/

Subversion svn auto deploy project on commit

Filed Under (linux) by admin on 14-04-2011

Automate the deploy of your project on svn commit, this require you have access to your svn server

On your server got to your repo folder
/usr/local/svn/my_repo
———————————————————————–
then go to hooks folder
/usr/local/svn/my_repo/hooks
———————————————————————–
then copy the post-commit.tpl to post-commit
cp post-commit.tpl post-commit

the post-commit file is a file called by subversion after every commit, basically its a bash script
———————————————————————–
chmod the post-commit file
chmod +x post-commit
———————————————————————–
Now lets edit the post-commit file.
Lets say your project dev directory resides on the same server, the post-commit file has content so we erase them all and add this


#!bin/usr/bash
cd /home/dev_website
svn up .

what the bash does is change directory to the /home/dev_website then execute the svn update command
———————————————————————————————————————————————–

and were done, next time there is no need to log in to the server just to svn update of your dev website.

How to get the version number of your redhat or fedora core

Filed Under (Others, linux) by admin on 07-04-2010

cat /etc/redhat-release

open ssl generate a random password

Filed Under (linux) by admin on 02-12-2009

Tagged Under :

Command to generate a decent random password

openssl rand -base64 6

ads
ads

Jobs at Lexmark Cebu

Software Tools Developer 5 Dec 2008, 1:11 pm

Software Tools Developer

Source: Jobs at Lexmark Jobs at Lexmark |

Company Nurse 5 Dec 2008, 1:11 pm

Company Nurse

Source: Jobs at Lexmark Jobs at Lexmark |

Industrial Designer 5 Dec 2008, 1:11 pm

Industrial Designer

Source: Jobs at Lexmark Jobs at Lexmark |

Data Owner 5 Dec 2008, 1:11 pm

Data Owner

Source: Jobs at Lexmark Jobs at Lexmark |

Firmware Product Systems Engineer (FPSE) 5 Dec 2008, 1:11 pm

Firmware Product Systems Engineer (FPSE)

Source: Jobs at Lexmark Jobs at Lexmark |

Talent Management Specialist 5 Dec 2008, 1:11 pm

Talent Management Specialist

Source: Jobs at Lexmark Jobs at Lexmark |

Business Control Analyst (Auditor) 5 Dec 2008, 1:11 pm

Business Control Analyst (Auditor)

Source: Jobs at Lexmark Jobs at Lexmark |

SAP System Analyst 5 Dec 2008, 1:11 pm

SAP System Analyst

Source: Jobs at Lexmark Jobs at Lexmark |

Firmware Development Engineers 5 Dec 2008, 1:11 pm

Firmware Development Engineers

Source: Jobs at Lexmark Jobs at Lexmark |

HR Officer (Shared Services) 5 Dec 2008, 1:11 pm

HR Officer (Shared Services)

Source: Jobs at Lexmark Jobs at Lexmark |

Technical Writers 5 Dec 2008, 1:11 pm

Technical Writers

Source: Jobs at Lexmark Jobs at Lexmark |

Spanish-speaking Customer Service Representative 5 Dec 2008, 1:11 pm

Spanish-speaking Customer Service Representative

Source: Jobs at Lexmark Jobs at Lexmark |

Technical Illustrator 5 Dec 2008, 1:11 pm

Technical Illustrator

Source: Jobs at Lexmark Jobs at Lexmark |

Recruitment Assistant 5 Dec 2008, 1:11 pm

Recruitment Assistant

Source: Jobs at Lexmark Jobs at Lexmark |

Team Lead 5 Dec 2008, 1:11 pm

Team Lead

Source: Jobs at Lexmark Jobs at Lexmark |

Technical Support Representative 5 Dec 2008, 1:11 pm

Technical Support Representative

Source: Jobs at Lexmark Jobs at Lexmark |

Technical Trainer 5 Dec 2008, 1:11 pm

Technical Trainer

Source: Jobs at Lexmark Jobs at Lexmark |

Software Build and Library Administrator 5 Dec 2008, 1:11 pm

Software Build and Library Administrator

Source: Jobs at Lexmark Jobs at Lexmark |

Business Database Administrator 5 Dec 2008, 1:11 pm

Business Database Administrator

Source: Jobs at Lexmark Jobs at Lexmark |

EDI - Support Analyst 5 Dec 2008, 1:11 pm

EDI - Support Analyst

Source: Jobs at Lexmark Jobs at Lexmark |