Friday, 10 October 2014

Tutorial How to download + naming your download file with the time it was downloaded + a little bit of crontab (nice title right i think about it myself :D)

Greetings and salutation my valiant reader, on this i will be explaining... well actually it'll just be like the title says, as i am inexperienced there might be some mistake here and there so... DEAL WITH BRO!

for the download thingy you guys can just refer to the previous post *teehee

now lets move on to how to rename your download file with the time it was downloaded 
first of all let me introduce y'all to something we'll definitely need

%m : month (01..12)
%d  : day
%y  : year
%A  : local weekdays name (e.g sunday)
%T  : time 

first of lets put some variable

[put yer preferred variables1]=`date +"%d-%m-%y\ %A"`  #this here for day, month and year
[put yer preferred variables2]=`date +"%T"` #for time second,minute,hour

now lets combine those two the download and the rename with the power of text editor :v (I AM HE-MAN!!!!!!!!!!!!)

this is one of the example of how the script going to be :

#!/bin/bash
deito=`date +"%d-%m-%y\ %A"`
clock=`date +"%T"`
mkdir -p /home/weebs/$deito
wget http://10.151.36.71/modul1/jadwal%20memberi%20makan%20ikan%20di%20akuarium sebelah%20komputer%20server -O /home/weebs/$deito/$clock.txt
 



Saturday, 4 October 2014

Tutorial on How to download on Ubuntu

Greetings and salutation to whoever reading it. this post here will guide ya on how to download on Ubuntu using file script, as i am inexperienced there might be some mistake here and there so... DEAL WITH BRO!

first open your text editor, and use whichever you think comfortable to use, then now i'll introduce you to tha' epic command that we'll use :

wget : this little command here that sound like midget will act as sort of downloader that you'll come to learn

'kay there let's start our script. SCRIPTING HO!!!

1.  #!/bin/bash  >if you're doing bash script it is at utmost important to add this line since this line mean you're using bash as default shell

2. for the next step we'll use our lil friend wget, look below for how to use it


   wget [insert yer download link]
3. now that we have targeted which will we download now let's go to da third and final step.

as we snipe our download link now we'll hafta decide where to put it, look below

-O [destination]

e.g : -O -O /home/[username]


now that we've done all the step i'll show you one of the example script :

#!/bin/bash

deito=`date +"%d-%m-%y\ %A"`

clock=`date +"%T"`

mkdir -p /home/weebs/$deito

wget http://10.151.36.71/modul1/jadwal%20memberi%20makan%20ikan%20di%20akuarium sebelah%20komputer%20server -O /home/weebs/$deito/$clock.txt



 


  


NO OBJECTION

I APPOINT MYSELF AS A CAPTAIN AND I SAID THIS BLOG IS OKAY