How to Schedule Downloads using bash?
This code is incredibly handy; it allows you to schedule the time for a download to happen — say, at 3PM while you’re at work or midnight while you’re sleeping.
This code is incredibly handy; it allows you to schedule the time for a download to happen — say, at 3PM while you’re at work or midnight while you’re sleeping.
Looking for large files on your server or linux computer? Find them simply using one of the following commands.
Modify your search changing the digit between the “+” and “M”.. Make sense right?
Alas, the CentOS 5.2 repositories do not have all required modules, so you need to so some work yourself. It does come with Python 2.4, which is OK for SABnzbd. Some extra packages are available if you allow access to the unofficial Dag Wieers repository:
OR
OR
Article Source: CentOS 5.2 (will work for RedHat 5 too)
Ubuntu Server 8.04
ClarkConnect 4.2 Community Edition
For more information: look here.
Converting a .mkv file to .avi is easy using this command. It should also merge the standard subtitles. The only problem is that the .avi is still large.
Packages needed: FFmpeg, spumux, dvdauthor. And maybe mkisofs to create a dvd iso. Or growisofs to burn directly. (If you need to identify your video, install Mplayer.
First we need a .mpg or .mpeg file. For example if you have an .avi file, convert this to .mpg (change pal-dvd to ntsc-dvd if needed)
Now we have the .mpg file we can set up the XML files with the settings for the conversion. Create spumux.xml and add the following settings into it.
You have to replace the filename, movie-width and the movie-height to your video preferences. You have seen them while converting if not use this command.
Now before we start processing, we need arial.ttf in our .spumux folder. If you don’t have a .spumux folder, create one;
OK — now we are all set, what you have to do now is use the following command.
INFO: Locale=en_US.UTF-8
INFO: Converting filenames to UTF-8
INFO: Detected subtitle file format: subviewer
INFO: Opened iconv descriptor. *UTF-8* *ISO8859-1*
INFO: Read 1340 subtitles
INFO: Adjusted 39 subtitle(s).
INFO: Unicode font: 1418 glyphs.
INFO: Found EOF in .sub file.
WARN: Read 0, expected 4
INFO: 1340 subtitles added, 0 subtitles skipped, stream: 32, offset: 0.50
Statistics:
- Processed 1340 subtitles.
- The longest display line had 48 characters.
- The maximum number of displayed lines was 3.
- The normal display height of the font arial.ttf was 32.
- The bottom display height of the font arial.ttf was 45.
- The biggest subtitle box had 4470 bytes.
Alright, when this is done we have to make another .xml file. Create dvd.xml and put this in there.
Obviously you have to change the vob file to your output video name. When you have done that we can do the following command.
INFO: Locale=en_US.UTF-8
INFO: Converting filenames to UTF-8
INFO: dvdauthor creating VTS
STAT: Picking VTS 01
STAT: Processing output.mpg…
STAT: VOBU 12080 at 4249MB, 1 PGCS
INFO: Video pts = 0.500 .. 5813.060
INFO: Audio[0] pts = 0.500 .. 5813.172
INFO: Audio[32] pts = 5.660 .. 5760.406
STAT: VOBU 12086 at 4250MB, 1 PGCS
INFO: Generating VTS with the following video attributes:
INFO: MPEG version: mpeg2
INFO: TV standard: pal
INFO: Aspect ratio: 4:3
INFO: Resolution: 720×576
INFO: Audio ch 0 format: ac3/6ch, 48khz drc
STAT: fixed 12086 VOBUS
INFO: dvdauthor creating table of contents
INFO: Scanning DVD/VIDEO_TS/VTS_01_0.IFO
You have just created a dvd including subtitles which you can enable or disable. What you got to do now is simply make a ISO or burn it directly to your blank dvd.
To make a ISO you can use this command:
If you want to burn it directly without making a .iso then use this command; (Replace /dev/scd0 with the device path to your DVD recorder)
With this code you can simply create a preview/sample of your video. Starts at 5.00 and ends on 8.00.
Package needed: Mencoder
If you decide to use “tar” as your backup solution, you should probably take the time to get to know the various command-line options that are available; type “man tar” for a comprehensive list.
The following code will create a full backup of your entire server. Excluding, /media, /proc and /var/spool/squid you might want to add or delete some excludes. Like /mnt, most servers mount devices in that folder. You need to exclude these as well. Also, You need to make sure you are creating your backup in a excluded folder/area. I make my backups in a mounted 30GB HD Device located in /media which is excluded.
If you only want to make a Backup from your /home and /root directory (which are probably the most important) just use this command:
Hope it works for you like it did for me, if you have any questions regarding to this post, please leave a comment so others can read it too.
Like you can see I’ve added a “digg it!” button to all of my posts. This is not the actual “digg” button from digg.com, But a-look-a-like. I didn’t want to use the official digg button because, then you need a digg.com account and you have to log in every time you want to vote/digg it.. which annoys me big time on other websites. (If i’m not right, you may want to correct me — leave a comment!)
So, if you like one of my posts! Don’t forget to digg it! Thanks.