background preloader

Linux Forums

Linux Forums

Related:  LinuxTerminal

27 Best Linux Tutorial Books That You Need To Download Now Do I need to describe what is Linux? No, I don’t. Because in the world of Technology, Everyone knows it. But why people do know? Linux is a versatile foundation of all the software and OS. Working with Files and Directories Here is an index to the topics in this section: The Unix filesystem structure All the stored information on a Unix computer is kept in a filesystem. Any time you initiate a shell login session, the shell considers you to be located somewhere within a filesystem. Although it may seem strange to be "located" somewhere in a computer's filesystem, the concept is not so different from real life. After all, you can't just be, you have to be somewhere.

BaBE - Bash By Examples - LinuxIntro BaBE - Bash By Examples; Your significant Linux scripting tutorial;; The easiest way to get your feet wet with a programming language is to start with a program that simply outputs a trivial text, the so-called hello-world-example. Here it is for bash: create a file named hello in your home directory with the following content: #!/bin/bashecho "Hello, world!"

HowTo Format Date For Display or Use In a Shell Script byVivek GiteonFebruary 27, 2007 last updated January 15, 2014 How do I format date to display on screen on for my shell scripts as per my requirements on Linux or Unix like operating systems? You need to use the standard date command to format date or time.

Writing Robust Bash Shell Scripts - David Pashley.comDavid Many people hack together shell scripts quickly to do simple tasks, but these soon take on a life of their own. Unfortunately shell scripts are full of subtle effects which result in scripts failing in unusual ways. It’s possible to write scripts which minimise these problems. In this article, I explain several techniques for writing robust bash scripts. How often have you written a script that broke because a variable wasn’t set? I know I have, many times.

HowTo: Check If a Directory Exists In a Shell Script byVivek GiteonApril 14, 2013 last updated August 23, 2013 How do I check if a directory exists in a shell script under Linux or Unix like operating systems? To check if a directory exists and is a directory use the following syntax: [ -d "/path/to/dir" ] && echo "Directory /path/to/dir exists." || echo "Error: Directory /path/to/dir does not exists." The following version also check for symbolic link: Bash Scripting Tutorial - Ryans Tutorials Welcome! Ok, so you want to learn how to write Bash scripts on Unix/Linux. Or, it's part of a subject you're doing and so you're learning because you have to. Manipulating Files with cat Red Hat Enterprise Linux has a utility which can help you keep short lists, gather lists together, and even show you information about your system. The utility is called cat, short for concatenate, which means to combine files. The command cat also displays the contents of an entire file on the screen (for example, type cat filename.txt). If the file is fairly long, it quickly scrolls past you on the screen. To prevent this, use the cat filename.txt | less command.