Quick Tip – Man Pages


Linux Man pages are one of the most useful resources a Linux user has in his arsenal when it comes to learning about a command line functionality or just about anything you could need to know about Linux. For example, today I want to transfer some log files from my server to my main computer analysis but a small script I had written, I decided do this via ftp (just cause I could). So the first thing that I did was check the man page to ensure I used the correct commands, by using man ftp.

man ftp

This shows an interactive document. You can scroll down to read more, press q to exit.

There are many different sections to the man program, each containing a different subset of commands and programs. This allows for different documentation of similar or the same named programs. For example, the apt program has to expansions – annotation processing tool and advanced packaging tool. Usually typing in a command into man produces the output you want, sometimes though you have to go searching.

man apt

This gives the man page for annotation processing tool.

man 8 apt

This gives the man page for advanced packaging tool.

If you come across the someone else referencing a man page, or you yourself want to reference a man page you would write it man program(section) eg for advanced packaging tool you would use man apt(8)

Advertisements

Removing a file from the command line


In my last post I talked about the 3 main ways of creating files from the command line. Today I will look at how to remove a file. Generally, to remove anything you would use the following command.

rm myfile.text

This is a very simple command, although by using some flags we can make it both safer and easier to use. -I gives a prompt before removing three or more files or when removing recursively, -v (or –verbose) prints everything that has been removed. You can also use the sudo command to remove a file from a folder where you do not have permissions to write.
(more…)

Creating Files Using the Command Line


Trying to do a simple post a day can be quite difficult, I have found. Thinking up new and original content is nigh impossible everyday, and while I have a dozen or so major articles and tutorials in the works, today is going to be something simple.

To this end today I have decided to talk about creating files in the command line.

There are many options, although three come to mind, each with there specific purposes.
(more…)

Creating and Using Symlinks


Often we want some files to be in two places at once. Perhaps you are working a website that has its files in you home folder and then you want them to be displayed in /var/www/. Or maybe the software that your working with requests specific files in one folder but another program wants the in their current one. Despite the difficulty that I have in describing why you would need such an ability, There is know denying that eventually you are going to need to know how to use symlinks.

At the most basic level a symlink (AKA the Symbolic Link or sometimes referred to as a soft link) is a pointer that points to the actually location of the files without the program knowing that the files are not actually there. It also allows for a there to be differences in group and ownership if the content of a file, but more of that another time. (more…)

%d bloggers like this: