171 reputation
5
bio website
location Halifax, Canada
age 35
visits member for 2 years, 1 month
seen 30 mins ago
GNU/Linux hacker and command line junkie.

Jan
15
comment How to simply convert video files (i.e.: MKV to MP4)?
And don't forget -movflags +faststart because mp4 sucks; without that, you can't play a partial file (where the end of the file isn't written yet).
Jan
15
comment How to simply convert video files (i.e.: MKV to MP4)?
Don't parse ls output, just for i in *.mkv; do ...;done. mywiki.wooledge.org/ParsingLs. Also, you could do "${i%.mkv}.mp4" to strip off the string ".mkv" before tacking on .mp4.
Jan
11
answered Is it possible to create commands, put it in one file and run without “./”?
Jan
11
comment Is it possible to create commands, put it in one file and run without “./”?
+1, don't put . in your $PATH. Just asking to get bitten by a tar archive that has a file called ls in it, containing rm -rf $HOME. So you shoot yourself in the foot someday looking at files you shouldn't be trusting.
Jan
11
comment Can I copy my Ubuntu OS off my hard drive to a USB stick and boot from that stick with all my programs?
So yeah, anyone attempting this should google up how to copy filesystems, and pick a method they like. Make sure it preserves permissions, owners, timestamps, ACLs, extended attributes, symlinks, device files, and preferably hardlinks. cpio | (cd somewhere; cpio) was the old standby, but it doesn't handle hardlinks.
Jan
11
comment Can I copy my Ubuntu OS off my hard drive to a USB stick and boot from that stick with all my programs?
The first tar command will run as typed, but it will output a tar file that just has one block-device special file. (not the contents, just the device-file.) In extract mode, tar's arguments are the list of files to extract from the archive.
Jan
11
comment Can I copy my Ubuntu OS off my hard drive to a USB stick and boot from that stick with all my programs?
I have seen big slowdowns in write-speed to USB sticks with Linux, though. Like maybe if they queue too much data to the device, it actually slows down? Because I found that rsync --bwlimit could sustain faster speeds if I hand-tuned it to a speed just below what I was getting before it bogged down. (use dstat or whatever to monitor IO speeds.) If this happens on the root / home filesystem, it might be pretty nasty to use when doing something write-intensive.
Jan
11
comment Can I copy my Ubuntu OS off my hard drive to a USB stick and boot from that stick with all my programs?
You'd probably want to have syslinux on the flash drive, but maybe have it load GRUB, instead of a kernel directly? Once you have a setup that loads a kernel + initrd, with root=LABEL, and that the kernel can find the root FS with that label, GNU/Linux should Just Work.
Jan
11
comment Can I copy my Ubuntu OS off my hard drive to a USB stick and boot from that stick with all my programs?
IDK if modern Ubuntu has anything in any of the directories that are shadowed when udev is mounted on /dev, for example. Probably not, since initrd and pivot_root is completely standard now, so a populated /dev existing for the boot scripts isn't needed.
Jan
11
comment Can I copy my Ubuntu OS off my hard drive to a USB stick and boot from that stick with all my programs?
Huh, /dev/sda is actually where you have your internal drive mounted, right? Not the device file. Ditto for /dev/sdc. You don't need to boot from USB to do this. You could just do it while your Ubuntu desktop is up and running from the hard drive you're going to use as the source for the copy. I'd use rsync -aHAXx to do the copy, as that preserves hardlinks. I forget if tar does or not. rsync -x limits to one filesystem, so you don't copy /proc, /sys, and all that crap from your running system. Booting from a live cd/usb is a workaround for --one-file-system.
Dec
27
comment How to change the framerate of a video without reencoding
I can't figure out how to get ffmpeg to output a different framerate though. Looks like mkvmerge / mp4box are necessary, unless you can get ffmpeg to output a raw .264 bitstream, and then use the fps option to the h.264 demuxer (which -h full documents it having, since the bitstream doesn't have timing info, just ordering.)
Dec
27
comment How to change the framerate of a video without reencoding
The timestamps in video streams are stored in the container, not the raw h.264 bitstream itself, I think. As long as you just want to change the timing, but not the order, of which frame is displayed when, you shouldn't need to transcode, just remux. (And if you do xcode, with faster hardware you'd use -preset slower or veryslow to get more quality at the SAME bitrate, instead of just throwing more bits at the problem. And use -crf 18 or something, not ABR)
Dec
18
answered Broken dependencies after installing Skype
Dec
6
answered Blacklisting packages from installing
Dec
3
awarded  Supporter
Sep
24
awarded  Autobiographer
Aug
6
comment What is the difference between Terminal, Console, Shell, and Command Line?
Oops, I didn't have a recent kernel source lying around. CONFIG_TTY was only added in 2012. Anyway, yeah hopefully that helps anyone trying to wrap their head around what the different pieces of the puzzle are, and how they fit together.
Aug
5
revised What is the difference between Terminal, Console, Shell, and Command Line?
Separate the pty description from the shell paragraph. Also, had my terminology all screwed up for pseudo-terminals. They're called pseudo, not virtual, and I had master/slave reversed.
Aug
5
awarded  Editor
Aug
5
revised What is the difference between Terminal, Console, Shell, and Command Line?
incorporate the fruits of some discussion in comments. Thanks Gilles