04-08-2010
i have to do one more thing.
i have directory structure
/home/ncs/payload/logs
in that i have directories like
payload1
payload2
payload3
payload4
payload5
inside this each payload ditectory i have the logs folder which appears like
pl03032010
pl04032010
.
:
:
so i want to make a looping from this directory /home/ncs/payload/logs
where it has to go and check inside each payload directory and delete the log folder which are 2 weeks older.
can you please suggest the safest way to do this ?
9 More Discussions You Might Find Interesting
1. Solaris
I have a Solris 9 box my problem is when I restart my box all my files and dirs in /tmp dir will be deleted exept 2 directories I found them since installation phase !!!!
How to keep my files at that dir " /tmp " even after restarting ??? (1 Reply)
Discussion started by: DarkSoul
1 Replies
2. UNIX for Advanced & Expert Users
Hello all,
I'm trying to accomplish that if a file gets written to folder /path/to/a/ it gets automatically copied into /path/to/b/ the moment its get written.
I thought of writing a shell script and cron it that every X amount of minutes it copies these files over but this will not help me... (2 Replies)
Discussion started by: Bashar
2 Replies
3. AIX
We have had an issue where the mail file filled up. Is there a setting in sendmail.cf to automatically remove old emails? Say after 14 days. If not is there any way automatically to delete older mail files?? (1 Reply)
Discussion started by: daveisme
1 Replies
4. UNIX for Dummies Questions & Answers
Hello,
Is it possible to make a file manager use different "colored folders" when browsing specific directories?
For example, if I open a gnome file manager and browse my windows share at, smb://192.168.1.101/z/ , can I make those folders appear green?
And when I open another instance of... (0 Replies)
Discussion started by: bz43
0 Replies
5. Shell Programming and Scripting
Hi ,
I need a script which basically deltes all files in folder a which are alreasy present in folder b
say folder a has files abc.txt
pqr .txt
and b has abc.txt
pqr.txt
rmr.txt
then file abc.txt and pqr.txt from a should be deleted (6 Replies)
Discussion started by: viv1
6 Replies
6. Shell Programming and Scripting
Hi,
Is there a way to use cp in such a way that when a file is copied to a destination, the required destination folders are automatically created with the proper permissions, and the resulting copied file has the same attributes as the original. For example if I copied... (1 Reply)
Discussion started by: pcwiz
1 Replies
7. Shell Programming and Scripting
I am using the below command to delete files from directories and subdirectories
find /test/abc/xyx -type f -mtime +7 -exec rm -f {} \;
there are some subfolders in xyx for which i don't have permission to delete.
Is there a way i can check the permission of the folder first and then delete... (4 Replies)
Discussion started by: ch33ry
4 Replies
8. Shell Programming and Scripting
Hi Team,
I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder.
Eg:
parent folder --> /Interface/data/test/IN
Sub folder -->/Interface/data/test/IN/Invoice20180607233338
Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies
9. Shell Programming and Scripting
Hi,
I have a script doing backup to synology server, the script create new folder each day with the date as being folder name i.e. 2018-07-30. Just before creating the new folder I want the script to find the oldest folder from the list and delete it including its content.
for example... (3 Replies)
Discussion started by: humble_learner
3 Replies
LEARN ABOUT ULTRIX
uuid_gen
uuid_gen(1ncs) uuid_gen(1ncs)
Name
uuid_gen - UUID generating program
Syntax
/etc/ncs/uuid_gen [ -c ] [ -C ] [ -version ]
Description
The program generates Universal Unique Identifiers (UUIDs). Without options, it generates a character-string representation of a UUID.
The -c option enables you to generate a template for Network Interface Definition Language (NIDL) files. The -C option enables you to gen-
erate source-code representations of UUIDs, suitable for initializing variables of type
Options
-c Generate a template, including a UUID attribute, for an interface definition in the C syntax of NIDL.
-C Generate a C source-code representation of a UUID.
-version Display the version of the Network Computing Kernel (NCK) that this belongs to but do not generate a UUID. (NCK is part of the
Network Computing System (NCS) on which DECrpc is based.)
Examples
Generate a character-string representation of a UUID:
$ /etc/ncs/uuid_gen
34dc23469000.0d.00.00.7c.5f.00.00.00
Generate a template for an interface definition in the C syntax of NIDL:
$ /etc/ncs/uuid_gen -c
%c
[
uuid(34dc239ec000.0d.00.00.7c.5f.00.00.00),
version(1)
]
interface INTERFACENAME {
}
Generate a template for an interface definition in the C syntax of NIDL. Redirect the output to the file
$ /etc/ncs/uuid_gen -c >myfile.idl
Generate a C source-code representation of a UUID:
$ /etc/ncs/uuid_gen -C
= { 0x34dc23af,
0xf000,
0x0000,
0x0d,
{0x00, 0x00, 0x7c, 0x5f, 0x00, 0x00, 0x00} };
See Also
DECrpc Programming Guide
uuid_gen(1ncs)