background preloader

Linux_commands

Facebook Twitter

Keyboard Shortcuts. Vim Recipes: Copying, Cutting, and Pasting. The Vim commands cheat sheet. HTG Explains: The Linux Directory Structure Explained. If you’re coming from Windows, the Linux file system structure can seem particularly alien. The C:\ drive and drive letters are gone, replaced by a / and cryptic-sounding directories, most of which have three letter names.

The Filesystem Hierarchy Standard (FHS) defines the structure of file systems on Linux and other UNIX-like operating systems. However, Linux file systems also contain some directories that aren’t yet defined by the standard. / – The Root Directory Everything on your Linux system is located under the / directory, known as the root directory. /bin – Essential User Binaries The /bin directory contains the essential user binaries (programs) that must be present when the system is mounted in single-user mode. /boot – Static Boot Files The /boot directory contains the files needed to boot the system – for example, the GRUB boot loader’s files and your Linux kernels are stored here. /cdrom – Historical Mount Point for CD-ROMs /dev – Device Files /etc – Configuration Files. Hexdump format strings : technovelty. Making Sense of Hexdump. I often work with binary data that has a format I could interpret if only I could see it in a human readable form.

Most text editors aren’t much use. One way (of many) to solve that is to use the hexdump utility. hexdump is very versatile and allows you to look at the structure inside binary files as you see fit and once you learn how to use it you can apply it quickly to many problems. I think that easily qualifies as cool. If you’ve used the hexdump man page then you may have found the formatting syntax quite intimidating. Part of the format syntax is pretty much the same as a commonly used function in the C programming language. I found hexdump syntax difficult and I am a C programmer. Contents: Basic usage The place to start is with a guess and just give hexdump the name of a data file and get whatever default format hexdump uses: What you are seeing there is the binary contents of the mydata file shown as lines of 8 individual 16-bit values in hexadecimal.

Viewing only part of a file.