Posts tagged as:

cli

I contributed to a Handbrake forum a while back. Thought you might find it useful too.
This is my evolving script for transcoding DVDs from MacTheRipper.
1) Save the file in a logical place (I keep it in the Movies Folder… same place I rip movies to). It will loop through all titles longer than X.
#!/bin/sh
# usage [...]

{ 1 comment }

Hosts File on Mac

by Ron on August 15, 2008

I can never remember the path to the hosts file on my MacBook Pro. So, here it is:
sudo nano /private/etc/hosts

{ 0 comments }

Find what version of Linux

by Ron on August 13, 2008

To find what flavor of Linux you’re using:
cat /etc/*-release
To find the version, use:
uname -a

{ 0 comments }

Find Large Files in Linux

by Ron on August 1, 2008

This doesn’t work perfectly, but I often use it to start tracking down disk hogs:
To return the 10 largest items in a given directory:
du -cksh * |sort -rn |head -11
Some times it’s helpful to view all
du -cksh * |sort -rn
If someone has a better approach, please comment.

{ 0 comments }

Find Failed Login Attempts in Logs

by Ron on August 1, 2008

Looking for a log to show you failed login attempts to your Linux machine? Look in:
/var/log/btmp
You can access it by running:
/usr/bin/lastb
It’s similiar to the wtmp log of user login/logouts and the utmp log showing who is currently logged in.

{ 0 comments }

Use cURL instead of wget on Mac OS X

by Ron on July 2, 2008

I use wget all the time on my Linux machines, but was surprised to find it missing on my MacBook Pro. Since Mac OS is based on BSD, it uses cURL instead. Here’s a good way to scrape files from a remote server.
curl -O http://www.gutenberg.org/files/21171/mp3/21171-[01-24].mp3
Man page is available at: http://curl.haxx.se/docs/manpage.html

{ 3 comments }

Restart Ensim via CLI

by Ron on July 1, 2008

After a few months of continuous use, I’ve found Ensim to start using too much swap space and getting sluggish. A quick restart via command line, always fixes both:
/etc/init.d/epld restart

{ 0 comments }

Files > 50M older than 4 years

by Ron on June 26, 2008

find /somedir -type f -size +50000k -mtime +1095 -exec ls -lh {} \; | awk ‘{ print  $6 “/” $8 ” ” $9 $10  $11 “: ” $5 }’

{ 0 comments }

I occasionally get this error when trying to run a heyu command from CLI. This should fix your problem:
(As root)
chmod 777 /dev/ttyS0

{ 2 comments }