03-21-2011
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi, i would like to determine how many shell scripts are in a directory. Someone recommended me the file command, but i don't know how to use it in that way.
anybody???
Thanks!!! (8 Replies)
Discussion started by: kfad
8 Replies
2. Shell Programming and Scripting
HI all,
I am wrkin on HP Unix .. can any1 let me know da usage of Touch command in shell scripting (1 Reply)
Discussion started by: ravi.sadani19
1 Replies
3. UNIX for Advanced & Expert Users
I usually ise find to search a file or name on the unix, since I am not administrator, there will be many line appear 'cannot access',usually a hundred of lines. How can I prevent this line coming out? only show I want?
The command I use is :
find / -name abcdef -print
Thank all expert. (1 Reply)
Discussion started by: zp523444
1 Replies
4. HP-UX
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies
5. AIX
How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
Can you please tell me the command, with which one can know the amount of space a specific directory has used.
df -k . ---> Displays, the amount of space allocated, and used for a directory.
du -k <dir name> - gives me the memory used of all the files inside <dir>
But i... (2 Replies)
Discussion started by: abhisheksunkari
2 Replies
7. Shell Programming and Scripting
cut command usages ??
i have a file named test
contents :
srikanth hyd 123
vinoth chn 234
vijay chn 345
hemanth hyd 456
$cut -f2 test
should display:
hyd
chn
chn
hyd
but am gettg full file?? (2 Replies)
Discussion started by: Diddy
2 Replies
8. Shell Programming and Scripting
I am trying to output a log file from cp usage. I think this can be achieved. In my code I have this.
cp -i -v ~/files/* ~/backups/oldfiles/;; > ~/logs/logfile.logThe error I get is "syntax error near unexpected token '>'
What am I missing? (7 Replies)
Discussion started by: gameinn
7 Replies
9. UNIX for Dummies Questions & Answers
I have one file like this:
NEW
/ifs/SQL_Backups3/SQL_SharePoint1
NEW
/ifs/SQL_Backups/SQL_SharePointThis can be easily sorted by the following command:
cat file| sort -k3,3nBut I have another file like this:
/Pool0/local/Benchmark
/Pool0/local/CRAD
/Pool0/local/crdhw/espresso_scratch1... (5 Replies)
Discussion started by: newbie2010
5 Replies
10. UNIX for Dummies Questions & Answers
Hi,
Could you please let me know, why we should not use '.' in move command, if we use it, is it something wrong.. Please share the details on it.
/home/rahualux/emp.csv /home/rahualux/details/employee_files/.
Or other example for mutlipile files
/home/rahualux/*.csv... (3 Replies)
Discussion started by: rahualux
3 Replies
LEARN ABOUT HPUX
prealloc
prealloc(2) System Calls Manual prealloc(2)
NAME
prealloc - preallocate fast disk storage
SYNOPSIS
DESCRIPTION
is used to preallocate space on a disk for faster storage operations.
fildes is a file descriptor obtained from a or system call for an ordinary file of zero length. It must be opened writable, because it
will be written to by size is the size in bytes to be preallocated for the file specified by fildes. At least size bytes will be allo-
cated. Space is allocated in an implementation-dependent fashion for fast sequential reads and writes. The EOF in an extended file is
left at the end of the preallocated area. The current file pointer is left at zero. The file is zero-filled.
Using on a file does not give the file an attribute that is inherited when copying or restoring the file using a program such as or (see
cp(1) and tar(1)). It simply ensures that disk space has been preallocated for size bytes in a manner suited for sequential access. The
file can be extended beyond these limits by operations past the original end of file. However, this space will not necessarily be allo-
cated using any special strategy.
RETURN VALUE
Upon successful completion, returns 0; otherwise, it returns -1 and sets to indicate the error.
ERRORS
fails and no disk space is allocated if any of the following conditions are encountered:
[EBADF] fildes is not a valid open file descriptor opened for writing.
[EDQUOT] User's disk quota block limit has been reached for this file system.
[EFBIG] size exceeds the maximum file size or the process's file size limit. See ulimit(2).
[ENOSPC] Not enough space is left on the device to allocate the requested amount; no space was allocated.
[ENOTEMPTY] fildes not associated with an ordinary file of zero length.
EXAMPLES
Assuming a process has opened a file for writing, the following call to preallocates at least 50000 bytes on disk for the file represented
by file descriptor outfd:
WARNINGS
Allocation of the file space is highly dependent on current disk usage. A successful return does not tell you how fragmented the file
actually might be if the disk is nearing its capacity.
AUTHOR
was developed by HP.
SEE ALSO
prealloc(1), creat(2), dup(2), fcntl(2), open(2), prealloc64(2), read(2), ulimit(2), write(2).
prealloc(2)