![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Ubuntu Ubuntu is a complete desktop Linux operating system, freely available with both community and professional support. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Exit or logout | kinai | UNIX for Dummies Questions & Answers | 1 | 04-14-2008 09:44 AM |
| .logout | sharif | SUN Solaris | 3 | 12-24-2007 05:08 AM |
| auto logout | lethgowerboy | UNIX for Dummies Questions & Answers | 2 | 11-21-2007 04:16 AM |
| .logout help | 2dumb | Shell Programming and Scripting | 3 | 05-10-2007 12:49 PM |
| logout | zam | UNIX for Dummies Questions & Answers | 2 | 12-28-2006 07:23 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi, I'm new to Linux and this forums. I was working on a logout script
and was wondering if anyone could help me out. What I'm trying to do is to delete the content of the ~/tmp/ directory and also to perform a check if any processes are currently running befor logout. this is what I have # ~/.bash_logout: executed by bash(1) when login shell exits. # when leaving the console clear the screen to increase privacy if [ "$SHLVL" = 1 ]; then [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q fi ps -u `whoami` | grep -v $$ | grep -v 'PID TTY' if ( $? == 0 ) then echo "" echo "WARNING - YOU HAVE RUNNING JOBS!" echo "" echo "press return to log out" read answer endif rm -rf /tmp/* rm -rf/var/tmp/* but it doesn't seem to work |
![]() |
| Bookmarks |
| Tags |
| deleting, logout, logout script, tmp |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|