Find the answer to your Linux question:
Results 1 to 4 of 4
I have only semi-basic linux experience (I use to run some old RedHat distros in college for C development, but havent used any linux distros in years). At our office, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2009
    Posts
    1

    Is it safe to delete (or clear) /dev/tty12


    I have only semi-basic linux experience (I use to run some old RedHat distros in college for C development, but havent used any linux distros in years).

    At our office, we have some linux servers but no one with skills to maintain them. I volunteered to take a look at them.

    We have a gentoo box which is using vservers (Im not really familiar with gentoo, or vservers). I can get into our virtual servers, and one of them seems to have a 16gig /dev/tty12 file. This is causing disk space problems on that vserver.

    From what I remember (and have googled), all of the tty* files represent the console, and virtual consoles. When I "cat tty12 | more", I can see indeed it is log entries (from what I think is an LDAP server).

    Is it safe for me to delete the /dev/tty12 file to free up the 16gig of space its using? Or is there a proper way to clear tty12?

    I tried rebooting the vserver with "shutdown -r now", but when I log back into it the tty12 is still 16gig.

    Can anyone tell me if its safe to clear the tty12 contents (maybe with a "tail -10 > /dev/tty12" command?), or if there is a better/safer way to clear it?

  2. #2
    Just Joined! chris81's Avatar
    Join Date
    Jan 2009
    Posts
    62
    Hi

    Maybe it can be safe to delete those ttys, but I don't suggest you to do that.

    Those tty are used when the display manager (gdm in most cases or kdm, xdm, ...) fail or is absent from the system. You first logon to the tty1 (by default), and to access the others tty, just to hold down alt and hit the function key associated (alt+f10 displays you the tty10).
    This is true if you are running a 2.4.x (or older) kernel. This is mostly true if you are running a 2.6.x kernel. They changed that with the 2.6 kernel, now, physically, you have access to tty1 (alt+F1) thru tty 6 (alt+F6). Don't know what they did with tty 7 thru tty12.

    chris81

  3. #3
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651

  4. #4
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,498
    We had a server nearly run out of space and our very clever admin did this...

    Code:
    tail -500 huge.log > huge.log
    which seemed to work OK.

    He then rebooted the server as the actual free space disagreed with what df -h reported.
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    The Fifth Continent

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •