Sunday, January 6, 2013

Linux Shell Scripting: How to analyze and compress the folders inside a given directory?

Q. I want to make a shell script to do the following: scan a directory for folders (not files) that are over 7 days old, and then compress them. How do I go about doing this?

A. Do you have access to the "man" pages?

man find

Search the web for that if you need to.

You'll need things like the -mtime option for modification time, and I forget the option that determines if the file is a folder. Then the -exec option to run the command to compress.

Is Linux good or bad for someone wanting to learn programming?
Q. What is the best way to start?

A. Programming on Linux will give you the experience you'll need to become a professional programmer, from the very beginning.

The built-in C/C++ compiler will not only tell you why your code is incorrect, why it'll never be correct, but also why you're so stupid for ever wanting to code that way. Then send you out in a ~Phailboat~.

It's strict and funny sometimes because it will literally put you in your place when you code.


Words of Wisdom,
- Hex

Which linux distro would best take advantage of my new pcs many resources?
Q. I just finished building a 6 core (amd) desktop pc, with 4 gigs of ram, and an ati radeon hd 5770 videocard. I have been planning on using ubuntu, but I thought maybe since my computer has so much power, I should use a more demanding kde desktop. Which distro would you reccomend for the best experience? (I have strong tech knowledge). Thanks!

A. Considering you put the emphasis on your PC power - select Debian, Ubuntu or LinuxMint and install the KDE environment that makes sense.

But there are other things to consider in choosing a Linux distro you'll like (64-bits or 32, community help, ease of configuration, security, package available, updates frequency etc ...)

I think this quizz can really help : http://polishlinux.org/choose/quiz/
or http://www.tuxs.org/chooser/




Powered by Yahoo! Answers

No comments:

Post a Comment