the lost linux commands – part 1

Often we forgotten a useful and necessary command in linux , in this series of articles we’re going to discover it… the power of shell!!!
in this first articole we see:

mesg
tee
uniq

 1 mesg and write – the first chat?

I this is the first type of chat in in the history, and today it is still present on Linux systems.

mesg [y/n]
simply enable o disabe the possibility to recive a message from other user , whit no argument show current status

write user [tty name]
This command permit direct on-line comunication whit other user currently logged ino your UNIX system

example – show this video

 

2 Tee – pipe fitting

The tee ( for a ” T ” connection ) command tranfers data from the standard input to the standard output and diverts a copy into one o more file

tee [OPTION]… [FILE]…
-a, –append
append to the given FILEs, do not overwrite

-i, –ignore-interrupts
ignore interrupt signals

example

mattia@ferzip:~$ ls | tee test.txt | wc -l
9
mattia@ferzip:~$ cat test.txt
Documenti
Immagini
Modelli
Musica
Pubblici
Scaricati
Scrivania
test.txt
Video
mattia@ferzip:~$

3 uniq – Remove Repeat Lines in a sort file

This command is used to collapse or count redundant adjacent lines in a file, yielding a file a unique collection of line.

Mandatory arguments to long options are mandatory for short options too.

-c, –count
prefix lines by the number of occurrences

-d, –repeated
only print duplicate lines

-D, –all-repeated[=delimit-method]
print all duplicate lines delimit-method={none(default),prepend,separate} Delimiting is done with blank lines

-f, –skip-fields=N
avoid comparing the first N fields

-i, –ignore-case
ignore differences in case when comparing

-s, –skip-chars=N
avoid comparing the first N characters

-u, –unique
only print unique lines

-z, –zero-terminated
end lines with 0 byte, not newline

-w, –check-chars=N
compare no more than N characters in lines

–help display this help and exit

–version
output version information and exit

Example

mattia@ferzip:~$ cat test.txt
a
a
a
a
b
b
b
c
c
mattia@ferzip:~$ uniq -d test.txt
a
b
c
mattia@ferzip:~$

stay on


.

share save 120 16 the lost linux commands   part 1

6 comments:

  1. test

    My programmer is trying to convince me to move to .net from PHP.
    I have always disliked the idea because of the expenses.
    But he’s tryiong none the less. I’ve been using
    WordPress on various websites for about a year and am anxious
    about switching to another platform. I have heard fantastic things about blogengine.net.
    Is there a way I can transfer all my wordpress content into it?
    Any help would be greatly appreciated!

  2. Joyce

    I was suggested this blog by my cousin. I am not sure whether
    this post is written by him as no one else know such detailed about my problem.
    You’re incredible! Thanks!

  3. corporate gifts singapore

    Remember, flowers are a luxury item, rather than a basic
    necessity, so working class neighborhoods are not well suited to this kind of business.
    And as long as the gift has high perceived value, the brand
    name will not matter. So, yes, personalized water bottles make great corporate gifts.

  4. skip hire

    Hey There. I found your blog using msn. This is a very well written article.

    I’ll make sure to bookmark it and come back to read more of
    your useful information. Thanks for the post.
    I’ll certainly return.

Lascia un Commento

L'indirizzo email non verrà pubblicato.

È possibile utilizzare questi tag ed attributi XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>