Surprisingly, I see quite a few questions around file ownership asked all the time. And one of the first questions asked concerns the Unix user who owns a particular file. It's very easy to confirm who the owner of a file is, and you can do it using … [Continue reading] about How to Find the Owner of a File in Unix
Find Out Linux Version using Linux Standard Base (LSB) files
You probably know that modern Linux distributions have many things in common. Well, one of the reasons for this is LSB - Linux Standard Base. LSB is a joint project by a number of Linux vendors to standardize the OS environment. From Linux … [Continue reading] about Find Out Linux Version using Linux Standard Base (LSB) files
How To Find Large Files and Directories in Unix
When you're trying to clean up your filesystems and reclaim some space, one of the first things you'll want to do is to confirm the largest directories and individual files you have. This can be easily done using two Unix commands: find command and … [Continue reading] about How To Find Large Files and Directories in Unix
Unix filesystem basics: symlink example
I can see some of you have arrived to my Unix file types post looking for an example of using symlinks in Unix. Today I would like to give you a quick introduction into Unix symlinks. What is symlink? Symlink is a short name for symbolic link … [Continue reading] about Unix filesystem basics: symlink example
How To Find Out a File Type and Permissions in Perl
A few months ago, I've given a really simple example of using Perl for parsing directory trees in Unix. If you looked closer at it, you would have noticed that the script was working fine, but showing file modes as strange large numbers which didn't … [Continue reading] about How To Find Out a File Type and Permissions in Perl
How to Compare Text Files Using diff
If you need to compare two text files in Unix, you're mostly likely to use the diff command. Today I'll talk about the simplest scenario: you want to compare two files and understand if there are any differences. … [Continue reading] about How to Compare Text Files Using diff
How To Find Out Which Group a Unix User Belongs To
If you know the name of a particular user on your Unix system and just want to confirm the primary Unix group (gid) of this individual, just use the id command: $ id -g greys 115 … [Continue reading] about How To Find Out Which Group a Unix User Belongs To
How To Find Out User ID in Unix
There's quite a few ways to confirm a user ID (uid) in Unix. id command This is probably one of the easiest ways to find out a uid of a particular user in your system: # id -u greys 500 The most common way of using the id command is even simpler, and … [Continue reading] about How To Find Out User ID in Unix
bash: Find Out the Version of Your Unix Shell
bash (Bourne Again SHell) comes with pretty much every Unix-like OS these days. If you ever wonder what exact version of bash shell you have on your system, here's how you find out: just use the --version parameter in the command line. Using … [Continue reading] about bash: Find Out the Version of Your Unix Shell
Unix Sockets Tutorial
I've noticed how many people found other pages of this blog trying to find more information about Unix sockets, and so I thought it's about time we shed some light on this seeming mysterious, but really simple concept. What is a Unix socket? A Unix … [Continue reading] about Unix Sockets Tutorial