[ubuntu-in] Command Line Problems

Abhishek Amberkar [अभिषेक आंबेरकर] abhishek.amberkar at gmail.com
Wed Oct 24 06:21:22 BST 2007


On 10/19/07, ramnarayan.k at gmail.com <ramnarayan.k at gmail.com> wrote:
>
> Hi
>
> Am having some CL problems
>
> First sometimes when i used a command (say like dmesg -c)  am not able
> to view the entire output - when i scroll right to the top - where the
> command and the output i am not able to get to the top.
>
> Why ? is there some setting i need to change to make the number of lines
> visible unlimited !!
>
> Specific Problems with dmesg
>
> *1 Am unable to pipe dmesg to a txt file output
> tried using this command
> dmesg -c > filename



Try dmesg -c >>  /tmp/filename

Can anyone explain why this works and not ' > ' ?

tried it with sudo as well but got a file with 0 bytes
> tried to add a dot txt extension same result file size 0 bytes
>
>
> *2 Does dmesg have to be under su mode only
> this is the message i get when i try is as normal used
> > ram at ram-laptop:~$ dmesg -c
> > klogctl: Operation not permitted
>
> This does not occur everytime nd i cannot figure a pattern to it.
>
> *3 After using dmesg -c i am unable on repeating the command i get no
> output. which means i either have to copy the dmesg to a file and read
> it / or worse reboot to see the whole thing again (after having an
> incomplete dmesg in the first place)
>
> Further if i have a specific device i am searching checking for if i
> unplug and replug it the dmesg gives me only the last output (for the
> unplugged and replugged device)
>
> I have tried removing the -c to clear buffer ring but i am still stuck
> with the latest unplugged and retarted lines and not the whole dmesg
>
> So whats going on
>
> I tried the -n (levels) and -s (bufsize) but i either get an error or
> nothing happens.
>
> see sample below:
> > ram at ram-laptop:~$ dmesg -s 32784
> > [ 1143.048000] usb 1-1: USB disconnect, address 3
> > [ 1143.048000] pl2303 ttyUSB0: pl2303 converter now disconnected from
> ttyUSB0
> > [ 1143.052000] pl2303 1-1:1.0: device disconnected
> > [ 1145.276000] usb 1-2: new full speed USB device using uhci_hcd and
> address 4
> > [ 1145.428000] usb 1-2: configuration #1 chosen from 1 choice
> > [ 1145.432000] pl2303 1-2:1.0: pl2303 converter detected
> > [ 1145.432000] usb 1-2: pl2303 converter now attached to ttyUSB0
> > ram at ram-laptop:~$ dmesg
> > [ 1143.048000] usb 1-1: USB disconnect, address 3
> > [ 1143.048000] pl2303 ttyUSB0: pl2303 converter now disconnected from
> ttyUSB0
> > [ 1143.052000] pl2303 1-1:1.0: device disconnected
> > [ 1145.276000] usb 1-2: new full speed USB device using uhci_hcd and
> address 4
> > [ 1145.428000] usb 1-2: configuration #1 chosen from 1 choice
> > [ 1145.432000] pl2303 1-2:1.0: pl2303 converter detected
> > [ 1145.432000] usb 1-2: pl2303 converter now attached to ttyUSB0
> > ram at ram-laptop:~$
>
> ***
> hoping to know whats happening and how to rectify it.
>
> thanks
> ram
>
>
>
>
>
>
>
> --
> ubuntu-in mailing list
> ubuntu-in at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-in
>



-- 
With Regards
Abhishek Amberkar

There is no operating system but GNU, and Linux is one of its kernels.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/ubuntu-in/attachments/20071024/3f3b3a68/attachment.htm 


More information about the ubuntu-in mailing list