This should give you a template you can use to get the variables you want. I use the Korn shell, but this will work with any shell that recognizes the shell variable expansions required by the POSIX standards (including bash and ksh):
This User Gave Thanks to Don Cragun For This Post:
hi all,
in my server there are some specific application files which are spread through out the server... these are spread in folders..sub-folders..chid folders...
please help me, how can i find the total size of these specific files in the server... (3 Replies)
Would someone please give me a script that will remove all but the newest jpg image from my server.
i am uploading a new image every 10 seconds form a live web cam
Also i do not know who to make a shell script work
i am new to all this so i need all the help you could give
Thank You very much (1 Reply)
How do I configure kickstart server to install workstation using centos image and other workstation using redhat enterprise image.
I configured my kickstart server to auto install centos 5.3 and it working fine.
However I would like to configure kickstart server, so that workstation with... (1 Reply)
Hello All:
I a website with over 1800 pages in all HTML and I am trying to figure out, what is the best way for me to see when the image files were last accessed.
Reason being, I am sure I have images in there that were not deleted when a page was taken offline or whatever and I would like... (3 Replies)
Is there a script or extension that I can look into that will re-size an allotment of images to a given size?? Id like to take images of a certain size and resize them but Im dont remember an install option that can do it if installed in ubuntu but I, also unsure in what code I will have to learn.... (2 Replies)
Hi,
I'm running a Red Hat Enterprise Linux Server release 5.3 (Tikanga) on VMWare. It is a production system for which I may not get downtime soon. I happened to resize a underlying disk and the changes are not reflecting in the fdisk ouput. Further details are as follows.
The disk which i... (3 Replies)
I need a command or mini scripts that can find certain type of images file recursively from the current dir with files of minimum 736 width and resize them by "736 max width, relative height" and replace the source files. I currently have GD installed but can also install Imagemagick if needed, I'm... (5 Replies)
Ultimately, I'm looking to create a script that allows me to plug in a usb drive with lots of jpegs on it & copy them over to a folder on my hard drive. So in the process of copying I am looking to hash check them, record dupes to a file, copy only 1 of the identical files (if it doesn't exsist... (1 Reply)
Hi Guys,
Just entering the Linux word, So I need help to write a script on my local machine(Ubuntu 14.04) that continuously check the particular folder(contains images) and a json file on the server and download whenever new images are added to that folder and whenever there is a change in the... (10 Replies)
Discussion started by: g4v1n
10 Replies
LEARN ABOUT PHP
uniqid
UNIQID(3) 1 UNIQID(3)uniqid - Generate a unique IDSYNOPSIS
string uniqid ([string $prefix = ""], [bool $more_entropy = false])
DESCRIPTION
Gets a prefixed unique identifier based on the current time in microseconds.
Warning
This function does not create random nor unpredictable strings. This function must not be used for security purposes. Use a cryp-
tographically secure random function/generator and cryptographically secure hash functions to create unpredictable secure IDs.
PARAMETERS
o $prefix
- Can be useful, for instance, if you generate identifiers simultaneously on several hosts that might happen to generate the iden-
tifier at the same microsecond. With an empty $prefix, the returned string will be 13 characters long. If $more_entropy is TRUE,
it will be 23 characters.
o $more_entropy
- If set to TRUE, uniqid(3) will add additional entropy (using the combined linear congruential generator) at the end of the
return value, which increases the likelihood that the result will be unique.
RETURN VALUES
Returns the unique identifier, as a string.
EXAMPLES
Example #1
uniqid(3) Example
<?php
/* A uniqid, like: 4b3403665fea6 */
printf("uniqid(): %s
", uniqid());
/* We can also prefix the uniqid, this the same as
* doing:
*
* $uniqid = $prefix . uniqid();
* $uniqid = uniqid($prefix);
*/
printf("uniqid('php_'): %s
", uniqid('php_'));
/* We can also activate the more_entropy parameter, which is
* required on some systems, like Cygwin. This makes uniqid()
* produce a value like: 4b340550242239.64159797
*/
printf("uniqid('', true): %s
", uniqid('', true));
?>
NOTES
Caution
This function does not generate cryptographically secure tokens, in fact without being passed any additional parameters the return
value is little different from microtime(3). If you need to generate cryptographically secure tokens use openssl_ran-
dom_pseudo_bytes(3).
Note
Under Cygwin, the $more_entropy must be set to TRUE for this function to work.
PHP Documentation Group UNIQID(3)