Hi ppl,
We are using Sun OS and recently, encountered this strange problem.
When issuing the "w" or "who" command, the system produce no listing. See screen shot below.
-----------------------
$ w
2:56pm up 2 day(s), 21:10, 0 users, load average: 1.03, 0.75, 0.69
User tty ... (6 Replies)
Hello,
I create a file touch 1201093003 fichcomp
and inside a repertory (which hava a lot of files) I want to list all files created before this file :
find *.* \! -maxdepth 1 - newer fichcomp but this command returned bash: /usr/bin/find: Argument list too long
but i make a filter all... (1 Reply)
Hi all, below is my PERL script
$ids = $dbh->prepare ("select * from tableA");
$ids->execute();
$names = $ids->fetchall_arrayref();
print " Total valid ids is $#names \n"; Table only has 1 column, approx 400 rows
the value of $#names is -1. Would anyone point out what could have caused the... (1 Reply)
When I enter the command below grep appears to be returning a file it shouldn't.
find . -name "*.*" -exec grep "testing" {} /dev/null \;
:tps3Mailfile
./SSI.ksh: # create TECHOUT dummy for test for testing purposes
./ftprimi1.ksh:# before running job in prod... change FTP to go to rimi... (3 Replies)
The rdist command script is called in the program to synchronize the updated files, I wonder whether the rdist returned can be fetched or not from the program? (0 Replies)
Hi, there,
I want to excute the remote command shell via "remsh", are there any simple or best way to get the result of remote shell from local ? thanks. (2 Replies)
Hi Pals
I am using this command in my script to find out warnings using fgrep where $log is the log file name, $date is the date to be searching and warnings.list contains list of matching words.
grep "WARNING" $log|grep "$date"|fgrep -vf warnings.list
I want to perform another action... (1 Reply)
Hi all
can i use unix variable holds the data returned by oracle in a shell script?
x=sqlplus -s u/p@h <<! >>fg.log
whenever sqlerr exit 1
select count(*) from schema.mat_view;
exit
!
echo $x
Will the $x return the value of count(*)?
thanks
megh (1 Reply)
Hi there
I have to enhance my current file looping to ensure the oldest file being processed first.
current command:
for FILENAME in `find $MY_DIRECTORY -follow -type f`
I manage to get command for order by date modified descending, just can't get the ascending order. Please help
for... (3 Replies)
Hi,
In a file old.txt containing (for example) a series..
#limerick There was a young lady from Nantucket..
\images\Blank.jpg
:end
#joke A horse walked into a bar...
\images\Blank.jpg
end
I would like to achieve new.txt containing
#limerick There was a young lady from Nantucket..... (5 Replies)
Discussion started by: Nigel_R
5 Replies
LEARN ABOUT CENTOS
truncate
TRUNCATE(1) User Commands TRUNCATE(1)NAME
truncate - shrink or extend the size of a file to the specified size
SYNOPSIS
truncate OPTION... FILE...
DESCRIPTION
Shrink or extend the size of each FILE to the specified size
A FILE argument that does not exist is created.
If a FILE is larger than the specified size, the extra data is lost. If a FILE is shorter, it is extended and the extended part (hole)
reads as zero bytes.
Mandatory arguments to long options are mandatory for short options too.
-c, --no-create
do not create any files
-o, --io-blocks
treat SIZE as number of IO blocks instead of bytes
-r, --reference=RFILE
base size on RFILE
-s, --size=SIZE
set or adjust the file size by SIZE bytes
--help display this help and exit
--version
output version information and exit
SIZE is an integer and optional unit (example: 10M is 10*1024*1024). Units are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB, ...
(powers of 1000).
SIZE may also be prefixed by one of the following modifying characters: '+' extend by, '-' reduce by, '<' at most, '>' at least, '/' round
down to multiple of, '%' round up to multiple of.
GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Report truncate translation bugs to <http://translationpro-
ject.org/team/>
AUTHOR
Written by Padraig Brady.
COPYRIGHT
Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO dd(1), truncate(2), ftruncate(2)
The full documentation for truncate is maintained as a Texinfo manual. If the info and truncate programs are properly installed at your
site, the command
info coreutils 'truncate invocation'
should give you access to the complete manual.
GNU coreutils 8.22 June 2014 TRUNCATE(1)