04-03-2013
My apologies, that makes sense, I have changed the title of the post to something more appropriate.
Also, I put comments in the code/query so people could understand my thought process, does it not come across as a clear thought?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi people.
I working on a script to check for files that they are suposed not to be on the directory. I mean, inside of each directory it must have some files but some could be wrong, and i want to move the files that are wrong.
Ex:
CSPOTGET edpst/CargadoresSPOT Historicos_Spot_MDI.zip... (4 Replies)
Discussion started by: osramos
4 Replies
2. Shell Programming and Scripting
################################################################
Copy this script to your path from where you want to search for all the files and directories in subdirectories recursively.
#################################################################
code starts here... (2 Replies)
Discussion started by: Ramit_Gupta
2 Replies
3. Red Hat
Hi,
I have dummies questions:
My script here can find the files in any directories older than 30 days then it will delete the files but not the directories. I would like to also be able to delete the directories that hold old files more than 30 days not just the files itself.
find . -type f... (2 Replies)
Discussion started by: lamoul
2 Replies
4. Shell Programming and Scripting
Hi
I need a script that can search through a set of directories and can locate any file or directory that has a space at the end
Filename(space)
Foldername(space)
I then need to remove that space within the script
Hope someone can help
thanks in advance
Treds (8 Replies)
Discussion started by: treds
8 Replies
5. Shell Programming and Scripting
Hello
I have some directories and files created under /export/local/user
I would like to delete directories only under /export/local/user, created before 3 days
Can someone help me with command to do this task?
Thanks (4 Replies)
Discussion started by: needyourhelp10
4 Replies
6. Shell Programming and Scripting
I have a directory where lot of "gzip" files are dropped in every 5 minutes. There is an application which will process these gzip and move it to another directory but will leave a gzip.out file with lot of output data.
I need to remove all the outfiles except for the one which is being... (1 Reply)
Discussion started by: gubbu
1 Replies
7. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Need to make a script, to remove all empty files and folders from current category.
It also should show the name... (2 Replies)
Discussion started by: Itixop
2 Replies
8. UNIX for Dummies Questions & Answers
This is a real world problem so I think you might found this interesting. We have servers which are shared by multiple team members. Each team member has its own user id and home directory. Now with time each user starts creating files which in end caused the disk to be full.
Now for creating a... (5 Replies)
Discussion started by: Rohit06
5 Replies
9. Shell Programming and Scripting
Hello,
I'm trying to figure out how best to approach this script, and I have very little experience, so I could use all the help I can get. :wall:
I regularly need to delete files from many directories.
A file with the same name may exist any number of times in different subdirectories.... (3 Replies)
Discussion started by: *ShadowCat*
3 Replies
10. Shell Programming and Scripting
Hello,
I need help in writing the shell script for below mentioned case.
There are 2 servers(server A, server B).
A cronjob syncs files between these 2 servers.
Existing script is copying files from A to B.
This is done using the command rsync.
However, the files are not deleted... (2 Replies)
Discussion started by: SravaniVedam11
2 Replies
LEARN ABOUT NETBSD
setproctitle
SETPROCTITLE(3) BSD Library Functions Manual SETPROCTITLE(3)
NAME
setproctitle -- set process title
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
void
setproctitle(const char *fmt, ...);
DESCRIPTION
The setproctitle() function sets the invoking process's title. The process title is set to the last component of the program name, followed
by a colon and the formatted string specified by fmt. If fmt is NULL, the colon and formatted string are omitted. The length of a process
title is limited to 2048 bytes.
EXAMPLES
Set the process title to the program name, with no further information:
setproctitle(NULL);
Set the process title to the program name, an informational string, and the process id:
setproctitle("foo! (%d)", getpid());
SEE ALSO
ps(1), w(1), getprogname(3), printf(3)
HISTORY
The setproctitle() function first appeared in NetBSD 1.0.
CAVEATS
It is important never to pass a string with user-supplied data as a format without using '%s'. An attacker can put format specifiers in the
string to mangle your stack, leading to a possible security hole. This holds true even if you have built the string ``by hand'' using a
function like snprintf(), as the resulting string may still contain user-supplied conversion specifiers for later interpolation by
setproctitle().
Always be sure to use the proper secure idiom:
setproctitle("%s", string);
BSD
April 13, 1994 BSD