to clean unnecessary files and folders


 
Thread Tools Search this Thread
Operating Systems Solaris to clean unnecessary files and folders
# 1  
Old 06-29-2011
to clean unnecessary files and folders

I want to clean used solaris OS and then to give another developer.

How can I understand that difference between system file/folder and others.
I want to delete apart from the files/folders.
I need tools or scripts like disk-cleanup or something like that.

Code:
#usr>du -s -h *
 6.6M    4lib
   1K    5bin
 348K    SUNWale
   1K    X
 1.2M    X11
   1K    X11R6
   1K    adm
  28M    apache
  16M    apache2
 106M    appserver
 172K    aset
  43M    bin
 2.5M    ccs
 6.3M    demo
   1K    dict
  82M    dt
   1K    games
   6K    gnome
  29M    include
 107M    j2se
   1K    java
 326M    jdk
 2.1M    kernel
   4K    kvm
 809M    lib
 172M    local
   1K    mail
   1K    man
   5K    net
   1K    news
  32K    oasys
   1K    old
 475M    openwin
  58M    perl5
 9.0M    platform
   1K    preserve
  15K    proc
   1K    pub
  51M    sadm
  15M    sbin
 413M    sfw
 262M    share
 3.2M    snadm
   1K    spool
   1K    src
 571M    staroffice7
   1K    tmp
 736K    ucb
 159K    ucbinclude
 626K    ucblib
 415K    vmsys
 2.9M    xpg4
 498K    xpg6
#usr>

# 2  
Old 06-29-2011
How should a tool know what can be discarded? If you can't tell it any tool, it won't clean up by sense. No clue if there is any tool for Unix/Linux that does this but how could it know.
So if you don't know what happened with this box, best would be a fresh install.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

UNIX Script to clean files

Hello All, I need a script that would delete files which are more than "X" number of days old, also if there can be a log file of the deleted files for reference. I am from windows background hence finding it difficult. Any help is much appreciated Regards Wert (4 Replies)
Discussion started by: wert468
4 Replies

2. Shell Programming and Scripting

How to copy files/folders and show the files/folders?

Hi, So i know we use cp -r as a basic to copy folders/files. I would like this BUT i would like to show the output of the files being copied. With the amazing knowledge i have i have gone as far as this: 1) find source/* -exec cp -r {} target/ \; 2) for ObjectToBeCopied in `find... (6 Replies)
Discussion started by: Imre
6 Replies

3. Shell Programming and Scripting

How to clean 3 days before files, from a directory?

I have a Solaris System. I am using bash shell. I want to prepare a script which can do the below. There are few directories i need to clean. In those directories, I need to delete files which are older than 3 days. 3 days before files need to be deleted. The directories are as follows.... (7 Replies)
Discussion started by: Saidul
7 Replies

4. Shell Programming and Scripting

List all the files in the present path and Folders and subfolders files also

Hi, I need a script/command to list out all the files in current path and also the files in folder and subfolders. Ex: My files are like below $ ls -lrt total 8 -rw-r--r-- 1 abc users 419 May 25 10:27 abcd.xml drwxr-xr-x 3 abc users 4096 May 25 10:28 TEST $ Under TEST, there are... (2 Replies)
Discussion started by: divya bandipotu
2 Replies

5. UNIX for Dummies Questions & Answers

Searching for folders/parent folders not files.

Hello again, A little while back I got help with creating a command to search all directories and sub directories for files from daystart of day x. I'm wondering if there is a command that I've overlooked that may be able to search for / write folder names to an output file which ideally... (2 Replies)
Discussion started by: Aussiemick
2 Replies

6. Shell Programming and Scripting

Compare 2 folders to find several missing files among huge amounts of files.

Hi, all: I've got two folders, say, "folder1" and "folder2". Under each, there are thousands of files. It's quite obvious that there are some files missing in each. I just would like to find them. I believe this can be done by "diff" command. However, if I change the above question a... (1 Reply)
Discussion started by: jiapei100
1 Replies

7. Shell Programming and Scripting

noob question - is awk the tool to clean dirty text files?

Hi, nevermind. I think I've found the answer. It appears I was looking for index, match, sub, and gsub. I want to write a shell script that will clean the html out of a bunch of files and format the data for import into excel. Awk seems like a powerful tool, but it seems oriented to... (1 Reply)
Discussion started by: yogert909
1 Replies

8. Shell Programming and Scripting

Clean old log files

Hi, I want to remove old log files (more than 7 days log files), rest of the logs should be present on my Linux box. could some one please give me any thoughts. Thanks. (3 Replies)
Discussion started by: marmam
3 Replies

9. UNIX for Dummies Questions & Answers

Comparing filename-substrings and remove unnecessary files

hi folks... i have to write a sript that removes unnecessary backup-files. iam new to shell scripting so please be patient with me. and no its not homework :p these files look like "javacore303330.1209029863.txt" where the first number is the PID and the second is the timestamp. so there can be... (5 Replies)
Discussion started by: cypher82
5 Replies

10. IP Networking

unnecessary route entry?

Good day :) I recently checked some stuff on my gateway and discovered what I believe is an unneeded route entry. # route -n Kernel IP routing table Destination Gateway Genmask ... Iface 287.265.45.0 0.0.0.0 255.255.255.0 ... eth0 192.168.0.0 0.0.0.0 ... (3 Replies)
Discussion started by: J.P
3 Replies
Login or Register to Ask a Question