Barbed wire
The fence on each side of the gate ends with two corner posts braced or unbraced depending on the size of the post. An unpounded post (often an old broken post) is held to one corner post with wire rings which act as hinges. On the other end a full-length post, the tractor post, is placed with the pointed end upwards with a ring on the bottom stapled to the other corner post, the latch post, and on top a ring is stapled to the tractor post, tied with a Stockgrower's Lash or one of numerous other opening bindings. Wires are then tied around the post at one end then run to the other end where they are stretched by hand or with a stretcher, before posts are stapled on every 1.2 metres (4 ft). Often this type of gate is called a portagee fence or a portagee gate in various ranching communities of coastal Central California.
Most gates can be opened by push post. The chain is then wrapped around the tractor post and pulled onto the nail, stronger people can pull the gate tighter but anyone can jar off the chain to open the gate.

Uses: 

Agriculture: Barbed wire fences remain the standard fencing technology for enclosing cattle in most regions of the United States, but not all countries. The wire is aligned under tension between heavy, braced, fence posts (strainer posts) and then held at the correct height by being attached to wooden or steel fence posts, and/or with battens in between.
The gaps between posts vary depending on type and terrain. On short fences in hilly country, steel posts may be placed every 3 metres (3 yd), while in flat terrain with long spans and relatively few stock they may be spaced up to 30 to 50 metres (33 to 55 yd) apart. Wooden posts are normally spaced at 10 metres (11 yd) on all terrain, with 4 or 5 battens in between. However, many farmers place posts 2 metres (2 yd) apart as battens can bend, causing wires to close in on one another.
Barbed wire for agricultural fencing is typically available in two varieties: soft or mild-steel wire and high-tensile. Both types are galvanized for longevity. High-tensile wire is made with thinner but higher-strength steel. Its greater strength makes fences longer lasting because it resists stretching and loosening better, coping with expansion and contraction caused by heat and animal pressure by stretching and relaxing within wider elastic limits. It also supports longer spans, but because of its elastic (springy) nature, it is harder to handle and somewhat dangerous for inexperienced fencers. Soft wire is much easier to work but is less durable and only suitable for short spans such as repairs and gates, where it is less likely to tangle.
In high soil-fertility areas where dairy cattle are used in great numbers, 5- or 7-wire fences are common as the main boundary and internal dividing fences. On sheep farms 7-wire fences are common with the second (from bottom) to fifth wire being plain wire. In New Zealand wire fences must provide passage for dogs since they are the main means of controlling and driving animals on farms.

Warfare and law enforcement: Barbed wire was used for the first time by Portuguese troops defending from African tribes during the Combat of Magul in 1895. Less well known is its extensive usage in the Russo-Japanese War.
In 1899 barbed wire was also extensively used in the Boer War, where it played a strategic role bringing spaces under control, at military outposts as well as to hold the captured Boer population in concentration camps.
The government of the United States built its first international border fence from 1909 to 1911 along the California-Mexico border. It included barbed wire and was intended to keep cattle from moving between the two countries. In 1924, the United States created its border patrol, which built more barbed wire fences on the Mexican border; this time to prevent people from crossing.
More significantly, barbed wire was used extensively by all participating combatants in World War I to prevent movement, with deadly consequences. Barbed wire entanglements were placed in front of trenches to prevent direct charges on men below, increasingly leading to greater use of more advanced weapons such as high-powered machine guns and grenades. A feature of these entanglements was that the barbs were much closer together, often forming a continuous sequence.
Barbed wire could be exposed to heavy bombardments because it could be easily replaced, and its structure included so much open space that machine guns rarely destroyed enough of it to defeat its purpose. However, barbed wire was defeated by the tank in 1916, as shown by the Allied breakthrough at Amiens through German lines on August 8, 1918.
One British writer described how the Germans used barbed wire as follows:  The enemy wire was always deep, thick, and securely staked with iron supports, which were either crossed like the letter X, or upright, with loops to take the wire and shaped at one end like corkscrews so as to screw into the ground.   The wire stood on these supports on a thick web, about four feet high and from thirty to forty feet across.   The wire used was generally as thick as sailor's marline stuff, or two twisted rope yarns.   It contained, as a rule, some sixteen barbs to the foot.  The wire used in front of our lines was generally galvanized, and remained grey after months of exposure.  The (German) wire, not being galvanized, rusted to a black color, and shows up black at a great distance.  

During the Great Depression, migratory work camps in the United States used barbed wire.
In the 1930s and 1940s Europe the Nazis used barbed wire in concentration camp and extermination camp architecture, where it usually surrounded the camp and was electrified to prevent escape. Barbed wire served the purpose of keeping prisoners contained.

Infirmaries in extermination camps like Auschwitz where prisoners were gassed or experimented on were often separated from other areas by electrified wire and were often braided with branches to prevent outsiders from knowing what was concealed behind their walls.
During the United States' World War II Internment of Japanese Americans, barbed wire was used to enclose the concentration camps, such as Manzanar.
During the 1968 Chicago riots, barbed wire was attached to the fronts of police and National Guard vehicles. The vehicles were used to drive into protesters and rioters and were nicknamed "Daly dozers" after then-Chicago mayor Richard J. Daley.

Safety and injuries: Most barbed wire fences, while sufficient to discourage cattle, are passable by humans who can simply climb over or through the fence by stretching the gaps between the wires using non-barbed sections of the wire as handholds. To prevent humans crossing, many prisons, and other high-security installations construct fences with razor wire, a variant which replaces the barbs with near-continuous cutting surfaces sufficient to injure unprotected persons who climb on it. Both razor wire and barbed wire can be bypassed with protection, such as a thick carpet, or with the use of wire cutters.
A commonly seen alternative is the placement of a few strands of barbed wire at the top of a chain link fence. The limited mobility of someone climbing a fence makes passing conventional barbed wire more difficult. On some chain link fences, these strands are attached to a bracket tilted 45 degrees towards the intruder, further increasing the difficulty.
Barbed wire began to be widely used as an implement of war during World War I. Wire was placed either to impede or halt the passage of soldiers, or to channel them into narrow defiles in which small arms, particularly machine guns, and indirect fire could be used with greater effect as they attempted to pass. Artillery bombardments on the Western Front became increasingly aimed at cutting the barbed wire that was a major component of trench warfare, particularly once new "wire-cutting" fuzes were introduced midway through the war.
As the war progressed, the wire was used in shorter lengths that were easier to transport and more difficult to cut with artillery. Other inventions were also a result of the war, such as the screw picket, which enabled construction of wire obstacles to be done at night in No Man's Land without the necessity of hammering stakes into the ground and drawing attention from the enemy.
During the Soviet–Afghan War, the accommodation of Afghan refugees into Pakistan was controlled in Pakistan's largest province, Balochistan, under General Rahimuddin Khan, by making the refugees stay for controlled durations in barbed wire camps (see Controlling Soviet–Afghan war refugees).
The frequent use of barbed wire on prison walls, around concentration camps, and the like, has made it symbolic of oppression and denial of freedom in general. For example, in Germany, the totality of East Germany's border regime is commonly referred to with the short phrase "Mauer und Stacheldraht" (that is, "wall and barbed wire"), and Amnesty International has a barbed wire in their symbol.
Movement against barbed wire can result in moderate to severe injuries to the skin and, depending on body area and barbed wire configuration, possibly to the underlying tissue. Humans can manage not to injure themselves excessively when dealing with barbed wire as long as they are cautious. Restriction of movement, appropriate clothing, and slow movement when close to barbed wire aid in reducing injury.
Infantrymen are often trained and inured to the injuries caused by barbed wire.