DIY & Tutorials > PC and related tutorials

Simplicity of Linux

(1/25) > >>

Rotten Johnny:
One of the things I like about using Linux is you're able to do many things quickly and easily that would typically require you to purchase a software tool on another OS.  The purpose of this thread is to capture some of these for others to benefit from and to serve as a reminder to myself.  They're not terribly sophisticated, but they work.  Feel free to add any you find useful.  Use at your own risk.

Make an ISO image from VOB files:
--- Code: ---mkisofs -dvd-video -udf -o <target_filename_here.iso> /path.to.parent.folder.for.AUDIO_TS.and.VIDEO_TS
--- End code ---

Mount a folder located on another device on your network using NFS:
sudo mount target.machine.ip.address:/path_to_nfs_share /path.to.mountpoint.on.local.pc e.g.
--- Code: ---sudo mount 192.168.168.252:/diskpool/d5 /media/diskpool/d5
--- End code ---

Traverse a directory tree and embed folder.jpg to all FLAC files:

--- Code: ---find . -name "*.flac" -type f -execdir metaflac --import-picture-from="folder.jpg" --show-tag="Title" {} \;
--- End code ---

Traverse a directory tree, remove any embedded artwork from FLAC files and subsequently embed folder.jpg to all FLAC files:

--- Code: ---find . -name "*.flac" -type f -execdir metaflac --remove --block-type=PICTURE {} \; && find . -name "*.flac" -type f -execdir metaflac --import-picture-from="folder.jpg" --show-tag="Title" {} \;
--- End code ---

Transcode M4A to WAV or FLAC:

--- Code: ---for f in *.m4a; do ffmpeg -i "$f" "${f%.m4a}.wav"; done
--- End code ---
change.wav to .flac if you'd prefer that flac files are generated rather than wav.

Split a WAV, FLAC, APE or WAVPACK file into discrete FLAC tracks using a cuesheet:

--- Code: ---cuebreakpoints <filename>.cue | shnsplit -i wav -o flac <source_filename.ext> && cuetag <filename>.cue split-track*.flac
--- End code ---

LAV:
Linux and other Unix flavours are cool and ultra-stable, but...

The biggest problem is usually software vendor support. Try as I might, some of the tools and toys I use simply don't exist for Linux. Very limited amateur radio / ham radio software support. Have not seen many camera mnfrs. supply their camera's software tools for anything but Meneer Gates's OS.

I've also played with a few flavours of Linux, but unfortunately for some uses, Mr. Gates has the edge. Dual-boot is possible but definitely not convenient.

Rotten Johnny:
How did a thread covering some HOWTOs for Linux turn into a Linux vs Windows debate  :)

File permissions always has me scratching my head (don't get enough practice), particularly affecting changes throughout a directory tree, so here are a few I've figured out the hard way:

To work only on directories, do the following:
--- Code: ---find . -type d -execdir <insert_command_here> {} \;
--- End code ---
e.g. to set R/W permissions for the user that owns a directory (incl. child directories) and all other members of the directory's group you'd use
--- Code: ---find . -type d -execdir chmod ug+rw {} \;
--- End code ---


Similarly, to act on specified files only:
--- Code: ---find . -name "<insert_filespec_here>" -type f -execdir <insert_command_here> {} \;
--- End code ---
e.g. to grant R/W file permissions to all members of a file's group for all files ending in .txt you'd use:
--- Code: ---find . -name "*.txt" -type f -execdir chmod g+rw {} \;
--- End code ---

GearSlave:

--- Quote from: audiomuze on April 26, 2011, 09:01:06 AM --- to set R/W permissions for the user that owns a directory (incl. child directories) and all other members of the directory's group you'd use
--- Code: ---find . -type d -execdir chmod ug+rw {} \;
--- End code ---


--- End quote ---

That is useful!

Rotten Johnny:

--- Quote from: gbyleveldt on April 26, 2011, 09:08:42 AM ---That is useful!

--- End quote ---
Borne of necessity whilst consolidating my music library and finding rsync had issues accessing some folders & files.  ;)

Navigation

[0] Message Index

[#] Next page

Go to full version