Hello Linuxmen
Today in tis article we shall learn cool command execution tricks in Linux/Unix.
Many times we have to run the same command or last command or any one command in recent history in our lovely Terminal/Putty. We press up button several times and search.
Lets try and implement some easier methods.
1. Execute the last command.
To execute last command we can simply press up button and press enter. Or We can use "!!" and press enter. This will do the same.
Prompt:~> date
Thu Mar 17 19:38:55 CET 2016
...
Read more »
|
Finally I understood sticky bit concept and I want to share this with all..
Best way to learn it is we shall try an example. We all might be aware of its definitions and theory:
RESTRICTED DELETION FLAG OR STICKY BIT(t)
- The restricted deletion flag or sticky bit is a single bit, whose interpretation depends on the file type.
- For directories, it prevents unprivileged users from removing or renaming a file in the directory unless they own the file or the directory; this is called the restricted deletion flag for the directory, and is commonly found on world-writable directories like /tmp.
-
...
Read more »
|
netstat - Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships
By default, netstat displays a list of open sockets. If you don't specify any address families, then the active sockets of all configured address families will be printed.
We shall exercise some examples to make it more clear.
1. List all connections to the system(Listening/ Non-listening)
nestat -a
Prompt~> netstat -a|head
Active Internet connections (servers and established)
Proto Recv
...
Read more »
|
Dedicated to all linux lovers..
If you love working in Linux/Unix operating system, you must try these commands for FUN.
1. REV
The rev utility copies the specified files to the standard output, reversing the order of characters in every line. If no files are specified, the standard input is read.
shankar@shankar-desktop ~ $ rev
shankar
raknahs
shankysportal
latropsyknahs
kumar
ramuk
bhagat
tagahb
shankys
syknahs
2. SL<
...
Read more »
|
Hello Linux Lovers
In this article we shall learn how to view/open a PDF file (*.pdf) or a postscript file (*.ps) in Linux system using commands.
This is quite simple. You can user Evince document viewer.
Evince is document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
Syntax:
evince [--help] [--usage] [--page-level=<level>] [filenames]
See below example
<
...
Read more »
|
Logical Volume Manager is a device mapper in LINUX which provides Logical Volume management.
With LVM, we can create logical partitions that can span across one or more physical hard drives.
LVM virtualizes the memory and the biggest advantage of LVM is that it allows disks to be added, replaced, reduced, resized without any downtime or service disruption.
LVM allows file systems to be easily resized later as per our need.
Creating and managing LVM is very simple. Just follow 3 steps process:
- First the hard drives are divided into physical volumes(PV).
-
...
Read more »
|
In this article we shall try to undestand grep and extended grep(grep with '-E' option).
-E, --extended-regexp
Interpret PATTERN as an extended regular expression (ERE, see below). (-E is specified by POSIX.)
Basic vs Extended Regular Expressions
In basic regular expressions the meta-characters ?, +, {, |, (, and ) lose their special meaning; instead use the backslashed versions \?, \+, \{, \|, \(, and \).
Traditional egrep did not support the { meta-character, and some egrep implementations support \{ instead, so portable scripts should avoid { in grep -E patterns and should use [{] to match a lite
...
Read more »
|
To create SWAP space/file in your system, you just need to follow below simple steps. First we shall see how much free space we are having using free -k or swapon -s command.
shankar@shankar-desktop ~ $ free -k
total used free shared buffers cached
Mem: 2061716 936484 1125232 0 43624 367612
-/+ buffers/cache: 525248 1536468
Swap: 492536 0 492536
shankar@shankar-desktop ~ $ swapon -s
...
Read more »
|
ALIEN - Convert FILES from/to rpm, lsb, deb, solaris packages or install an alien binary package.
FORMAT
alien [--to-deb] [--to-rpm] [--to-tgz] [--to-slp] [options] file [...]
DESCRIPTION
alien is a command line utility that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats to/from one another.
If you want to use a package from another linux distribution than the one you have installed on your system, you have to use alien to convert it to your preferred package format and install it.
It also supports LSB packages.
...
Read more »
|
FORMAT:
xrandr [-help] [-display display] [-q] [-v] [--verbose] [--dryrun] [--screen snum] [--q1] [--q12]
Per-output options
[--output output] [--auto] [--mode mode] [--preferred] [--pos xxy] [--rate rate] [--reflect reflection] [--rotate orientation] [--left-of output] [--right-of output] [--above output] [--below output] [--same-as output] [--set property value] [--off] [--crtc crtc] [--gamma red:green:blue]
DESCRIPTION
...
Read more »
| |