New hard y soft
Once again, one of the very basic question asked in the interviews, What is the difference between Hard links and Soft links. You can explain few basic things, but emphasizing on internals about the linux filesystem, is something which can impress the interviewer.
What is a Soft Link or Symbolic Link or Symlink ?
Symbolic links or Symlinks are the easiest to understand, because for sure you have used them, at least when you were using Windows. Soft links are very similar to what we say “Shortcut” in windows, is a way to link to a file or directory. Symlinks doesn’t contain any information about the destination file or contents of the file, instead of that, it simply contains the pointer to the location of the destination file. In more technical words, in soft link, a new file is created with a new inode, which have the pointer to the inode location of the original file. This can be better explained with a diagram:
Symbolic links are created with the “ln” command in linux. The syntax of the command is:
$ ln -s
-s = This flag tells to create a symlink (if you don’t use this it will create a hard link, which we will talk about soon).
For Example, if you want to create a soft link of one fo your favorite application, like gedit, on your desktop, use the command like this:
$ ln -s /usr/bin/gedit ~/Desktop/gedit
I hope now the concept of Soft Links should be clear.
What is a Hard Link ?
Hard link is a bit different object when compared to a symlink. In softlink a new file and a new Inode is created, but in hard link, only an entry into directory structure is created for the file, but it points to the inode location of the original file. Which means there is no new inode creation in the hard link. This can be explained like this:
So, in hard link, you are referencing the inode directly on the disk, which means that there should be a way to know how many hard links exist to a file. For the same, in the inode information, you have an option for “links”, which will tell how many links exists to a file. You can find the same information by using this command:
$ stat 01
Size: 923383 Blocks: 1816 IO Block: 4096 regular file
Device: 803h/2051d Inode: 12684895 Links: 3
Access: (0644/-rw-r–r–) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2012-09-07 01:00000 -0500
Modify: 2012-04-27 06:00000 -0500
Change: 2012-04-27 06:00000 -0500
In this example, it means that the specific file have 2 hard links, which makes the count to 3.
You can create a hard link with the same command “ln” like this
So, to create a hard link of gedit program on your desktop, you will use the command like this:
# ln /usr/bin/gedit ~/Desktop/gedit
Now, the bigger question is, who will decide what is better and when to use soft link or hard link
When to use Soft Link:
- Link across filesystems: If you want to link files across the filesystems, you can only use symlinks/soft links.
- Links to directory: If you want to link directories, then you must be using Soft links, as you can’t create a hard link to a directory.
G Flex 2 Phone Case, Bastex Heavy Duty Hybrid Kickstand Holster Case - Soft Blue Silicone Cover Hard Black Kickstand Holster Case for LG G Flex 2**INCLUDES STYLUS**
HTC Desire - Cellularvilla Hard Soft Dual Layer Hybrid Armor Shell Holster Kickstand Combo Case with Locking Belt Swivel Clip Cover for HTC Desire 510 (Yellow Black)
CoverON® HYBRID Dual Heavy Duty RED RUBBERIZED Hard Case and Soft BLACK TPU Skin Cover for HUAWEI M866 ASCEND Y US CELLULAR [WCC894]
For ZTE Valet Z665C Fury N850 Director N850L - Wydan Trapezoid Y-Stand Hybrid Hard Soft Gel Case Cover-Black on Blue w/ Wydan Stylus Pen, Prying Tool and Car Charger
Moto X - Cellularvilla Hard Soft Dual Layer Hybrid Armor Holster Kickstand Case with Locking Belt Swivel Clip Cover for Motorola Moto X XT1058 XT1060 XT1055 XT1056 XT1053 (Verizon) (Yellow Black)
How do we know which vowels are hard and which ones are soft when we come across new words? | Yahoo Answers
You're right about names. Many of them with foreign origins do not follow normal rules of pronunciation.
This is not a regional issue. The problem with English is that it borrows many words from many different languages, and often keeps the original spelling. The other problem was that when Noah Webster wrote America's first real dictionary, he decided that words' spellings should be related to their origins, in addition to their pronunciations.
There's kind of a rule for the vowels. The long vowels (hard?) usually have another silent vowel close by. Examples: cake, jeans, mile, Coke,…