LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-13-2006, 09:19 PM   #1
linuxmandrake
Member
 
Registered: Sep 2004
Distribution: debian sarge 64bit (AMD)
Posts: 709

Rep: Reputation: 30
Detecting i f file is complete


Say I am downloading a file using wget. Is it possible to have a program scan that file to see if it's completely finished downloading then shutdown the computer. Occsionally because of work I need to download large files which takes ages to download even on 1mb connection. I dont want my electircity bill to be sky high. Upgrading to faster connection isn't an option because too far away from my local exchange. I use bittorrent protocol and i cant seem to find a client that does this.
 
Old 01-13-2006, 09:51 PM   #2
TruongAn
Member
 
Registered: Dec 2004
Location: Vietnam (Việt Nam)
Distribution: Gentoo (desktop), Arch linux (laptop)
Posts: 728

Rep: Reputation: 33
Try this:
Code:
wget something && poweroff
When wget finish downloading, it exit and poweroff will run to shutdown your computer
 
Old 01-13-2006, 10:00 PM   #3
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Why not:

$ wget http://some.com/somefile.zip ; sudo shutdown -h now
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking a file is complete. carlmarshall Linux - Software 3 12-14-2005 09:46 AM
Sama SUSE 10 beta 4 doesnt show windows complete file list 1kyle SUSE / openSUSE 0 09-09-2005 05:59 AM
Getting PIDs which have files open / waiting for file write to complete prell Programming 2 03-29-2005 09:39 AM
detecting a file through bash or other means wayloud Linux - General 4 12-03-2004 11:46 AM
complete file sharing to XP mightyer2 Linux - Networking 5 08-19-2004 09:07 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration