Site Tools

User Tools


Distribution Independent

Tip/Tricks/Guides that work for any distribution (or at least should).

Tips/Tricks

Output Redirection

  • Save both standard output and error message:
    >&
  • Save standard output only:
    >

    or

    1>
  • Save error messages only:
    2>

These can be combined, like so:

gcc test.c 2> error.msg > /dev/null

This saves error messages but tosses standard output

Background and Foreground processes

Putting a command into the background

Example:

yum -y update &

Output:

[1]   21457

This only works when the user is logged on.

Bringing a command into the foreground

Use fg.

Example:

fg %1

or

fg 21457

Misc:

kill %1

nukes it.

Audio/Video

Converting video file to sequence of still images

ffmpeg -i video_file directory/filename.%04d.png