"Sometimes, You have to demo a threat to spark a solution" - Wish

Showing posts with label LinHowTo. Show all posts
Showing posts with label LinHowTo. Show all posts

HowTo: Linux / Unix Move Directory Up One Level


I would like to move a directory one level up into the root directory. 
 I've all html files located in /home/apache2/www/html directory, and I'd like to move /home/apache2/www/html to one level up at /home/apache2/www/. 
How can I accomplish this over the ssh session?

 You need to use mv command that moves one or more files or directories from one place to another. You must have have write permission for the directories which the file will move between. The syntax is as follows to move /home/apache2/www/html directory up one level at /home/apache2/www/ directory. Open a command-line terminal (select Applications > Accessories > Terminal), and then type (for remote system use ssh for login):

# mv /home/apache2/www/html/ /home/apache2/www/   OR,

# mv /home/apache2/www/html/ ..

Please note that Unix / Linux uses the special name .. to refer to the parent directory of a particular directory. In this example move /usb/archives/data/ directory to up one level using the mv command as follows:

# cd /usb/archives/data/

#  mv -v data/ ..

 

How Do I Move Multiple Directories Up One Level?

The syntax is as follows to moves each file named by a source operand to a destination file in the existing directory named by the directory operand:

 # mv dir1 dir2 .. 

In this example move both /home/vivek/projects/foo/ /home/vivek/projects/bar/ directories up one level:

$ mv /home/vivek/projects/foo /home/vivek/projects/bar ..

You can move files using the same syntax. In this example move movie-cd1.avi movie-cd2.avi files up one level:

$ mv /home/vivek/Downloads/movie-cd1.avi /home/vivek/Downloads/movie-cd2.avi ..

How Do I Move All Directories Up One Level?

Use the following syntax to move all directories and files in /home/vivek/data/sales/ to /home/vivek/data/:

$ mv -v /home/vivek/data/sales/ ..   OR,

$ cd /home/vivek/data/sales/

$ mv -v sales/ ..    
Read More...

What Does Open Source Mean?


Most software that you buy or download only comes in the compiled ready-to-run version. Compiled means that the actual program code that the developer created, known as the source code, has run through a special program called a compiler that translates the source code into a form that the computer can understand. It is extremely difficult to modify the compiled version of most applications and nearly impossible to see exactly how the developer created different parts of the program. Most commercial software manufacturers see this as an advantage that keeps other companies from copying their code and using it in a competing product. It also gives them control over the quality and features found in a particular product.

 Open source software is at the opposite end of the spectrum. The source code is included with the compiled version and modification or customization is actually encouraged. The software developers who support the open source concept believe that by allowing anyone who's interested to modify the source code, the application will be more useful and error-free over the long term.

 To be considered as open source software by the software development industry, certain criteria must be met:
  • The program must be freely distributed (It can be part of a package that is sold though, such as Red Hat has done with Linux in the example below).
  • Source code must be included.
  • Anyone must be allowed to modify the source code.
  • Modified versions can be redistributed.
  • The license must not require the exclusion of other software or interfere with the operation of other software.
Let's take a look at a real world example of open source software. In 1991, Linus Torvalds, a student at the University of Helsinki in Finland, developed a new operating system based on Minix, a derivative of Unix, which he dubbed Linux. Torvalds released version 0.02 of Linux under the GNU General Public Liceses, which provides a good legal definition of open source software. A lot of people around the world downloaded Linux and began working with it. Many of these users were programmers in their own right and made modifications to the source code that Torvalds had included. Over the next three years, Torvalds received these modified versions from the other programmers and incorporated many of the changes into the baseline version and released Linux version 1.0 in 1994

 A common concern for end-users who wish to use open source software is the lack of a warranty and technical support. Because the software's license encourages modification and customization, it is nearly impossible to support. This is why Red Hat Software, founded in 1994, created the "Official Red Hat Linux" and is able to sell this normally "free" software. The main value that Red Hat adds to the package is a warranty and technical support. For most businesses, the assurance of technical support has been a key factor in the decision to buy Linux instead of simply downloading it for free. In addition to Red Hat, there are several other companies that have packaged Linux, usually with additional software, for resale.

Besides Linux, Mozilla (Netscape browser core), Apache (Web server), PERL (Web scripting language) and PNG (graphics file format) are all examples of very popular software that is based on open source.

Read More...

What Is Linux And Why Is It So Popular ?


Every desktop computer uses an operating system. The most popular operating systems in use today are:
  • Windows
  • Mac OS
  • Unix
Linux is an operating system -- very much like UNIX -- that has become very popular over the last several years.
Operating systems are computer programs. An operating system is the first piece of software that the computer executes when you turn the machine on. The operating system loads itself into memory and begins managing the resources available on the computer. It then provides those resources to other applications that the user wants to execute. Typical services that an operating system provides include:
  • A task scheduler - The task scheduler is able to allocate the execution of the CPU to a number of different tasks. Some of those tasks are the different applications that the user is running, and some of them are operating system tasks. The task scheduler is the part of the operating system that lets you print a document from your word processor in one window while you are downloading a file in another window and recalculating a spreadsheet in a third window.
  • A memory manager - The memory manager controls the system's RAM and normally creates a larger virtual memory space using a file on the hard disk. (See also this Question of the Day.)
  • A disk manager - The disk manager creates and maintains the directories and files on the disk. When you request a file, the disk manager brings it in from the disk.
  • A network manager - The network manager controls all data moving between the computer and the network.
  • Other I/O services manager - The OS manages the keyboard, mouse, video display, printers, etc.
  • Security manager - The OS maintains the security of the information in the computer's files and controls who can access the computer.
 An operating system normally also provides the default user interface for the system. The standard "look" of Windows 98 includes the Start button, the task bar, etc. The Mac OS provides a completely different look and feel for Macintosh computers.

Linux is as much a phenomenon as it is an operating system. To understand why Linux has become so popular, it is helpful to know a little bit about its history. The first version of UNIX was originally developed several decades ago and was used primarily as a research operating system in universities. High-powered desktop workstations from companies like Sun proliferated in the 1980s, and they were all based on UNIX. A number of companies entered the workstation field to compete against Sun: HP, IBM, Silicon Graphics, Apollo, etc. Unfortunately, each one had its own version of UNIX and this made the sale of software difficult. Windows NT was Microsoft's answer to this marketplace. NT provides the same sort of features as UNIX operating systems -- security, support for multiple CPUs, large-scale memory and disk management, etc. -- but it does it in a way that is compatible with most Windows applications.

The entry of Microsoft into the high-end workstation arena created a strange dynamic. The proprietary operating systems owned by separate companies and the lack of a central authority in the UNIX world weaken UNIX, but many people have personal problems with Microsoft. Linux stepped into this odd landscape and captured a lot of attention.

The Linux kernel, created by Linus Torvalds, was made available to the world for free. Torvalds then invited others to add to the kernel provided that they keep their contributions free. Thousands of programmers began working to enhance Linux, and the operating system grew rapidly. Because it is free and runs on PC platforms, it gained a sizeable audience among hard-core developers very quickly. Linux has a dedicated following and appeals to several different kinds of people:
  •      People who already know UNIX and want to run it on PC-type hardware.    
  •      People who want to experiment with operating system principles
  •      People who need or want a great deal of control over their operating system
  •      People who have personal problems with Microsoft
In general, Linux is harder to manage than something like Windows, but offers more flexibility and configuration options.


Read More...

Reset Your Forgotten Password Quickly Ubuntu



If you have forgotten your Linux Password, many peoples face this problem you are not alone.

Note : Protect your Grub Entries with Username and Password.

So, first step to is Boot in to Recovery Mode.

After some processing. Now select "root - Drop to root shell prompt" and press ok.

If you forgot your username enter this command to know # ls /home

In Linux case is sensitive about username and password. If you Have upper case then you need to enter same letters.

 

Now enter following command to reset your password. # passwd [ username ]

For Ex. # passwd wish

Now enter your new password and confirm it. Reboot PC with this command. # reboot -h now

Read More...