Skip to main content

Posts

Showing posts from March, 2015

Purpose of the lost+found folder in Linux and Unix

If you run  fsck , the filesystem check and repair command, it might find data fragments that are not referenced anywhere in the filesystem. In particular,  fsck  might find data that looks like a complete file but doesn't have a name on the system — an  inode  with no corresponding file name. This data is still using up space, but it isn't accessible by any normal means. If you tell  fsck  to repair the filesystem, it will turn these almost-deleted files back into files. The thing is, the file had a name and location once, but that information is no longer available. So  fsck deposits the file in a specific directory, called  lost+found  (after  lost and found  property). Files that appear in  lost+found  are typically files that were already unlinked (i.e. their name had been erased) but still opened by some process (so the data wasn't erased yet) when the system halted suddenly (kernel panic or power failure). If that's all that happened, these files were slat

Exact difference between a terminal, a shell, a tty and a console

A terminal is at the end of an electric wire, a shell is the home of a turtle, tty is a strange abbreviation and a console is a kind of cabinet. Well, etymologically speaking, anyway. In unix terminology, the short answer is that terminal = tty = text input/output environment console = physical terminal shell = command line interpreter Console, terminal and tty are closely related. Originally, they meant a piece of equipment through which you could interact with a computer: in the early days of unix, that meant a  teleprinter -style device resembling a typewriter, sometimes called a teletypewriter, or “tty” in shorthand. The name “terminal” came from the electronic point of view, and the name “console” from the furniture point of view. Very early in unix history, electronic keyboards and displays became the norm for terminals. In unix terminology, a  tty  is a particular kind of  device file  which implements a number of additional commands ( ioctls ) beyond read and wr

Find the amount of free space on hard drive Linux

Enable the status bar in the View menu in Nautilus. This will place a bar at the bottom of all nautilus windows telling you the free space. Use the File Systems System Monitor to view a list of all disks and their free space. Use the Disk Usage Analyzer to get a listing of all directories on your system and how much free space they take up Go to any folder in nautilus and right click the background. Open the properties window to check the free space. Run the command  df -h .