Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #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

    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.


  3. #3

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

    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.
    Should you be sitting wondering,
    Which Batman is the best,
    There's only one true answer my friend,
    It's Adam Bloody West!

    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