How to redirect the standard output and the standard error in Unix

Sometimes you need to redirect the standard output (stdout) and / or the standard error (stderr). > or 1> redirects the stdout and 2> redirects the stderr. 1. Redirecting the stdout to file: command 1> file # ls /etc/grub.d/ >

How to verify if a package is installed in Debian and Fedora

How to find if an application is installed or not in your Linux distro, depends on that distro’s package manager. Find out if an application is installed in Debian with dpkg -l: This also works on Ubuntu/Linux Mint or other

The ultimate guide for using the Apt package manager

Apt is the package manager for Debian/Ubuntu/Linux Mint and other debian based distros. It is good because it solves the dependences. Use dpkg to install packages just if the installation failed with apt. 1. Searching the repositories for the packages

The ultimate guide for creating and removing directories

One or more directories can be created with a single mkdir command. 1. Creating directories: Syntax: mkdir [options] dirname $ mkdir dir1 dir2 dir3 $ ls -l drwxrwxr-x 2 razvan razvan 4096 2012-05-29 10:45 dir1 drwxrwxr-x 2 razvan razvan 4096

How to get root access inside Vim

It often happens to forget to use sudo when editing configuration files with vim. You write your modifications and when you want to save, you get the annoying error: “E45: ‘readonly’ option is set (add ! to override)”. The following

How to delete users in Linux with the generical userdel command

We already know how to create users in Linux, now let’s learn how to delete them: userdel The generical low level tool for deleting users is userdel: Syntax:userdel [options] user $ tail -3 /etc/passwd | cut -d ‘:’ -f 1,6

How to install wget on FreeBSD 9.0

To use the GNU Wget command on FreeBSD 9.0, you have to install it first. You can install it either from ports, or from the internet. Use only one of the two methods listed above. I recommend the pkg_add one

Three usefull shell tricks for creating zips

There tricks are usefull because you often need to zip only a certain type of files or all the files in a directory. In this article I will also prove the power of the asterisk (*) wildcard: I have this

How to create, split, join and extract zip archives in Linux

I create zip archives when I need to send them to the Windows people. And I usually have to split the archives because of the attachment size limit on email. 1. How to compress files with zip: Syntax: zip



Subscribe to get the latest Linux news and how to guides directly on your e-mail!