Root Folder Space Maintenance (SCO)


 
Thread Tools Search this Thread
Operating Systems SCO Root Folder Space Maintenance (SCO)
# 1  
Old 05-30-2007
Network Root Folder Space Maintenance (SCO)

We have SCO Unix (realease 5.0.5b),

Please advise which files can be safely deleted on the system root folder / to create space? These are mainly spool/message/history etc log files. Where they located and can they be deleted using rm?

The server has been operational for the past 4 years.

Thanks.
# 2  
Old 05-30-2007
Truncate the following files:
/usr/adm/messages
/usr/adm/syslog
/usr/spool/lp/logs/requests
/usr/spool/mail/root
/usr/spool/mail/cron

Do this by:
cat >file <cr>
<ctrl-d><cr>


remove all of the following:
core

Run the following from /
du -a |sort -r -n >/u/file.list

The output of this is a list of the files and directories on the entire system sorted in descending order by size. Using this you should be able to find files that you didn't know existed (inadvertently saved in the wrong directory), and which files are growing (have a recent file date).

Last edited by jgt; 05-30-2007 at 08:36 AM.. Reason: add instructions to truncate
# 3  
Old 05-30-2007
cat

Thanks jgt.

I didnt quite understand the cat. Please give example like on /usr/adm/messages or /usr/adm/syslog.

Regards.
# 4  
Old 05-30-2007
do the following as root

#cd /usr/adm
#cat > messages
type a <ctrl-d> followed by a carriage return
#
the effect of this is to create a file called messages with the same attributes as the original, but with a size of zero bytes.
The MS-DOS version of this is:
c:>copy con messages
<ctrl-z>
c:>
# 5  
Old 05-31-2007
Bug

Thanks jgt your a star.

The /usr/spool/mail/root was huge.

Using du -s * in /var:-
size before cat - 62224 and after - 59510

But I couldn't find /usr/spool/mail/cron??

On monitoring seems like the /var/opt & /var/spool folders are growing.

Are there any other files I can truncate/delete within these? What about the /tmp folder can I rm ALL files/folders in it??

Can cat be done on a link or do I have to go to actual folder/file to execute (scared to experiment)?

Regards...
# 6  
Old 05-31-2007
/var/spool is a link of /usr/spool, email and print files are all temporarily stored below this directory.

/var/opt is the location of the operating system files, /usr/bin /bin /etc are all links to something within /var/opt.

You should, by definition, be able to delete all the files in /tmp, and, in fact, in SCO 6.0.0 and Unixware, /tmp can be a ramdrive...but, I would make a copy of it, say "tar ctvf /u/tmp.tar /tmp" before deleting it the first time.

There are hard links, and soft(symbolic) links. There is no way to tell which is the original and which is the link with a hard link, so deleting one will delete both.
With soft links, the original file will still exist if the link (newer file) is deleted. See "man ln".

It doesn't matter which file name you use to truncate the file.

/usr/spool/mail/cron will only exist if you have cron jobs (typically scheduled overnight batch jobs) running.

If you are using mail on this system, you should move all the contents of /usr/spool/mail to /u/spool/mail, and then edit /usr/mmdf/mmdftailor and change the location of the spool files accordingly. Doing this will prevent someone from filling the root file system with email messages.
# 7  
Old 06-04-2007
Data

Hi,
1. Can I safely cat wtmp, utmp, wtmpx, utmpx & lastlog without causing any log-in/system problems as these files are growing?

2. My tmp is filling up only over week-end (Sunday). I have been monitoring durring the week and /tmp/ does not change in size; its only on Sunday.
The HUGE file being created is CroutSHBa0004R. This contains lines :-
var/opt/K/SCO/Unix/5.0.5Eb/etc/default/filesys does not exit
var/opt/K/SCO/Unix/5.0.5Eb/etc/default/format does not exit
var/opt/K/SCO/Unix/5.0.5Eb/etc/default/goodpw does not exit
var/opt/K/SCO/Unix/5.0.5Eb/etc/default/login does not exit
etc
etc
etc

I don't understand as these files do exist.

Looking into the crontab file, the jobs that run on Sunday are:-

17 5 * * 0 /etc/cleanup > /dev/null
0 2 * * 0,4 /usr/lib/cron/logchecker
0 4 * * 0 /etc/custom -V syslinks;# CUSTOM_SYMLINK_REPORT

Thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Move files from Space Folder to other folder

I want to move a folder with spaces from one folder to another. I have two folders like this, 1).RT_032-222 -4444-01/ 2). RT_032-555 -7777-01/ I want to move files from 2 to 1 through shell script.Here I want to assign this like a user defined variable like as Source branch... (2 Replies)
Discussion started by: kannansoft1985
2 Replies

2. HP-UX

Which Folder occupies more space?

Hi, What are the correct parameters to list folders size in MBs under a particular directory in HP-UX ? I know and commands but cannot get the output of folder sizes in MBs. (4 Replies)
Discussion started by: mohtashims
4 Replies

3. Solaris

root password for system maintenance (control-d to bypass)

I have message "root password for system maintenance (control-d to bypass)" after Solaris 10 boots up. Why it appears ? thx for help. (3 Replies)
Discussion started by: presul
3 Replies

4. SCO

root out of space in sco 5

DEAR Team, I need some help in sco open server 5 while booting server beloow message giving server HTFS no space dev HD 1/42 Thanks Skb (4 Replies)
Discussion started by: sudhir69
4 Replies

5. UNIX for Dummies Questions & Answers

Protecting a folder/directory against root access.

A friend and I run a vbulletin forum which recently got hacked. We believe what wound up happening was the attacker gained access to the VPS box and from there elevated their user accounts to admin status on our forums. Obviously if someone gets into our box in the future it'll be a disaster so... (1 Reply)
Discussion started by: fannypack
1 Replies

6. Shell Programming and Scripting

find the folder with space in name.

A solaris server with SAMBA share folder. The PC users created many folders with space on it, I want to find them out, but not list its subfolders. For example, I have below folders Copy of ABC/efg/xy sa/Test again/xyt If I use command: find . -type d |grep " " I will list 6 folders, but... (2 Replies)
Discussion started by: rdcwayx
2 Replies

7. UNIX for Dummies Questions & Answers

Creating space in root folder

Hi , I was wondering if anyone knows any great ways for creating space in your Root Folder. My root folder was created with only 247.7MB & I found out that its now full & I was initially wondering how important the "thumbnails Folder" was & if it was alright to delete their contenses as I noticed... (2 Replies)
Discussion started by: Browser
2 Replies

8. Shell Programming and Scripting

space in folder name

hi my folder name is below FTP_DIR="/DATA/TEMP/PA Mthly and Qrty files" But when i am using the varaible in my ftp shel script i am getting the error '/DATA/TEMP/VA: The system cannot find the path specified please advice. thanks in advance sam (2 Replies)
Discussion started by: sam99
2 Replies

9. Shell Programming and Scripting

Trick to ignore space in folder name

Hello All, I am getting error while passing a folder name that has space to the cmd line argument. sh log_delete2.sh "/home/kumarpua/TESTARTIFACTS/atf-chix/ATF-subversion-dev/ssenglogs/A RM" log_delete2.sh: line 17: cd: /home/kumarpua/TESTARTIFACTS/atf-chix/ATF-subversion-dev/ssenglogs/A:... (3 Replies)
Discussion started by: pulkit
3 Replies

10. UNIX for Dummies Questions & Answers

space in perticular folder in unix

can any one tell me how to know the free space in perticular folder in unix. size in bytes/MB. thanks in adv. spandu (7 Replies)
Discussion started by: spandu
7 Replies
Login or Register to Ask a Question