Sponsored Content
Top Forums UNIX for Advanced & Expert Users Issue with rm command in a tera byte file system Post 302898026 by methyl on Thursday 17th of April 2014 09:14:06 PM
Old 04-17-2014
Facebook

For starters please post the script and mention what Operating System and Shell you have.

At a guess your script generates a command which is too long for the Operating System.

Bearing in mind that we know nothing about your Operating System or Shell, the generic solution format is something like this (in ksh) where the criteria is to delete files more than 180 days old :

Code:
find /cullable_tree/ -type f -mtime +180 -print | while read FILENAME
do
     if [ -f "${FILENAME}" ]
     then
              echo "${FILENAME}"
              # rm "${FILENAME}"
              # (Uncomment when tested thoroughly)
     fi
done

The "if -f" covers circumstances where the filename contains weird characters.

This sort of construct never generates long command lines and may not be fast but it gets there in the end.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

byte count and cut command

1. Is there a way to count the number of bytes of a variable? example: abc@yahoo.com is 13 bytes 2. Cut command only allows one byte for delimiter example: cut -f1 -d'.' delimited by period. Is there a way to have two or more characters in the delimiter field? thanks in adavance. :) (4 Replies)
Discussion started by: hemangjani
4 Replies

2. Solaris

Tera Terminal Emulator

Hello Expert! :b: Question for you guys, Can anyone tell me how to use terminal emulator on Windows XP to view Solaris config? I have no idea on Solaris and the only thing I could do is to boot it up. Honestly, I have given a tasked to delete all the files and some necessary memory information... (2 Replies)
Discussion started by: katsloko
2 Replies

3. Shell Programming and Scripting

Check if 2 files are identical byte-to-byte?

In my server migration requirement, I need to compare if one file on old server is exactly the same as the corresponding file on the new server. For diff and comm, the inputs need to be sorted. But I do not want to disturb the content of the file and need to find byte-to-byte match. Please... (4 Replies)
Discussion started by: krishmaths
4 Replies

4. Solaris

File system Issue

Hi All, I am working with the Solaris 9. In df -h command / file system size is 9.6 GB , used 7.5 GB and avialble space is 2.1. OK But in du -hd command it is showing some 4.1 GB only. How to find out that remaining 3.4GB. Can you please help me ... Thanks and Regards, (1 Reply)
Discussion started by: lbreddy
1 Replies

5. Solaris

root file system issue

Hi, In df -h root file system showing (total size) (used) (free) /dev/dsk/c0t0d0s0 11G 7.6G 2.8G 73% / but du -hd command showng 5.1 gb used sapce. I am missing 3.00 gb space. Here I have to knoe where is Remaining space... (2 Replies)
Discussion started by: lbreddy
2 Replies

6. Solaris

/ file system full issue

Hi All, This is Babu working as a system administrator. Here I am getting one problem with one of my Sun server's root (/) file system. In df -h command / file system showing 7.8 GB used space.But in du -hd command it showing 5.2 gb only. Please can any one help me resolve this issue... (2 Replies)
Discussion started by: lbreddy
2 Replies

7. AIX

GPFS file system corrupt issue

Hi Administrators, I have one issue related to GPFS filesystem. We have bad entries in this file system, which reflects error like ls: 0653-341 The file <filename> does not exist. when we give "ls -ltr" on this directory. So we taken the FS filesystem offline and followed the below steps. ... (6 Replies)
Discussion started by: gauravgarg
6 Replies

8. Shell Programming and Scripting

Shared File system- lib access issue

I have a C++ binary executable installed in a file system which is shared across multiple solaris boxes. When I start this executable from one of the boxes,I am able to start only 4 parallel instances and from the 5th instance onwards I am getting the following error. fatal: libdb2.so.1:... (2 Replies)
Discussion started by: prasperl
2 Replies

9. Red Hat

Issue with mounting the file system .

Hi gurus, Need your help , Am facing some issue with one of the ext3 file system.while rebooting it failed to mount fs after running fsck i tried manuall but still no luck.However i made the machine up but am unable to mount file system can some one please help me. root@vm258902]~# cat... (2 Replies)
Discussion started by: kapil514
2 Replies

10. HP-UX

Traditional Chinese Multi-Byte issue

Trying to load a specific Traditional Chinese Character on an HP UX platform for a Taiwan database. Data is converting to ?. Database has existed since 2008 and this is the first issue I've seen where a user is unable to save the multi-byte character in the database. I'm thinking this is may be... (0 Replies)
Discussion started by: OHcoder
0 Replies
dbus-uuidgen(1) 					      General Commands Manual						   dbus-uuidgen(1)

NAME
dbus-uuidgen - Utility to generate UUIDs SYNOPSIS
dbus-uuidgen [--version] [--ensure[=FILENAME]] [--get[=FILENAME]] DESCRIPTION
The dbus-uuidgen command generates or reads a universally unique ID. Note that the D-Bus UUID has no relationship to RFC 4122 and does not generate UUIDs compatible with that spec. Many systems have a sepa- rate command for that (often called "uuidgen"). See http://www.freedesktop.org/software/dbus/ for more information about D-Bus. The primary usage of dbus-uuidgen is to run in the post-install script of a D-Bus package like this: dbus-uuidgen --ensure This will ensure that /var/lib/dbus/machine-id exists and has the uuid in it. It won't overwrite an existing uuid, since this id should remain fixed for a single machine until the next reboot at least. The important properties of the machine UUID are that 1) it remains unchanged until the next reboot and 2) it is different for any two run- ning instances of the OS kernel. That is, if two processes see the same UUID, they should also see the same shared memory, UNIX domain sockets, local X displays, localhost.localdomain resolution, process IDs, and so forth. If you run dbus-uuidgen with no options it just prints a new uuid made up out of thin air. If you run it with --get, it prints the machine UUID by default, or the UUID in the specified file if you specify a file. If you try to change an existing machine-id on a running system, it will probably result in bad things happening. Don't try to change this file. Also, don't make it the same on two different systems; it needs to be different anytime there are two different kernels running. The UUID should be different on two different virtual machines, because there are two different kernels. OPTIONS
The following options are supported: --get[=FILENAME] If a filename is not given, defaults to localstatedir/lib/dbus/machine-id (localstatedir is usually /var). If this file exists and is valid, the uuid in the file is printed on stdout. Otherwise, the command exits with a nonzero status. --ensure[=FILENAME] If a filename is not given, defaults to localstatedir/lib/dbus/machine-id (localstatedir is usually /var). If this file exists then it will be validated, and a failure code returned if it contains the wrong thing. If the file does not exist, it will be created with a new uuid in it. On success, prints no output. --version Print the version of dbus-uuidgen AUTHOR
See http://www.freedesktop.org/software/dbus/doc/AUTHORS BUGS
Please send bug reports to the D-Bus mailing list or bug tracker, see http://www.freedesktop.org/software/dbus/ dbus-uuidgen(1)
All times are GMT -4. The time now is 01:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy