summaryrefslogtreecommitdiffstats
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* Add a "fillchar" command line argument to dd(1) that permits the userrwatson2004-08-155-2/+32
| | | | | | | to specify an alternative padding character when using a conversion mode, or when using noerror with sync and an input error occurs. This facilities reading old and error-prone media by allowing the user to more effectively mark error blocks in the output stream.
* Change the behaviour of `-v' so that, e.g., stepping a month backyar2004-08-092-1/+30
| | | | | | | | | | | | | | | | | on March 31 won't take you to March 2 or 3 (now the result will be the last day of February.) In general, now stepping by months from the last days of the current month A will take you to the very last day of the target month B if B is shorter than A. The previous version would just step to March 31 and rely on mktime(3) to correct the date. Despite its simplicity, such way was counter-intuitive to users and caused pain to shell script writers. Noticed by: Igor Timkin <ivt at gamma dot ru> Approved by: brian MFC after: 2 weeks
* Join the 21st century: Cryptography is no longer an optional componentcperciva2004-08-061-1/+0
| | | | | | | | | | of releases. The -DNOCRYPT build option still exists for anyone who really wants to build non-cryptographic binaries, but the "crypto" release distribution is now part of "base", and anyone installing from a release will get cryptographic binaries. Approved by: re (scottl), markm Discussed on: freebsd-current, in late April 2004
* Now that we have gcc 3.4, we can flip ia64 to using a dynamically linkedgordon2004-08-061-1/+1
| | | | | | /bin and /sbin. Reviewed by: marcel (via pluto1)
* Allow for capital letters as size suffixes.pjd2004-07-311-8/+20
| | | | | Inspired by: le Approved by: green (maintainer)
* Currently if a mount point is not accessible by the calling user,csjp2004-07-202-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | invalid information will be printed if the -t flag is specified. $ df -t ufs Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ad0s1a 495726 139944 316124 31% / /dev/ad0s1e 253678 6438 226946 3% /tmp /dev/ad0s1f 56206340 13594248 38115586 26% /usr /dev/ad0s1d 694126 19812 618784 3% /var /dev/ad0s1d 694126 19812 618784 3% /var $ Note that the mount point which is not accessible shows up as the previous file system that was printed. The reason for this is that df -t will call statfs(2) on the pathname supplied by getfsstat(2). This is done to refresh the file system statistics in the event that a previous file system had a long delay in providing its stats. This change affects the df utility in the following ways: o Teach df has to deal with statfs(2) failing. If statfs(2) fails, fall back on the possibly stale stats provided by the initial call to getfsstat(2). o Print a warning that the fs stats could possibly be stale o Modify the man page and document this new behavior as a bug. Approved by: bmilekic (mentor) PR: 68165
* Use warn() instead of perror().tjr2004-07-202-4/+4
|
* Give the most awesome example of how to parse the output of datealfred2004-07-171-0/+8
| | | | | | back into epoch time. Everytime I'm asked to do this by someone I have to spend about ten minutes recreating the same command line. So record it under examples.
* Remove BUGS section that talked about missing multibyte character support.tjr2004-07-121-5/+1
| | | | We have support now that the regular expression routines do.
* KANJI and DSPMBYTE are now "on" by default in the tcsh 6.13.00 distribution.mp2004-07-112-24/+34
|
* Document missing multibyte character handling in utilities specifiedtjr2004-07-034-4/+20
| | | | by POSIX.
* Clarify: test compares strings by binary value, not "ASCII value".tjr2004-07-031-3/+3
|
* Deal with double whitespace.ru2004-07-039-21/+23
|
* Mechanically kill hard sentence breaks.ru2004-07-0218-156/+302
|
* Removed trailing whitespace.ru2004-07-021-1/+1
|
* Change the "rtprio" format so it prints an informative string forgad2004-06-271-0/+3
| | | | | | the PRI_ITHD case (instead of just printing the digit '1'). Submitted by: Cyrille Lefevre
* Improve checking for `ps -t <dev>', and give better error messages whengad2004-06-271-8/+16
| | | | | an invalid <dev> is specified. Aside: It turns out that the S_ISCHR() check is true for almost every device that we have (not just tty's).
* Don't continue if the '-C' option (a-la GNUtar; commited in options.cobrien2004-06-251-1/+3
| | | | | | | | rev 1.18, but not documented in the man page) caused a failed chdir. Otherwise, one can easily overwrite files. Submitted by: Robert Nagy <robert@openbsd.org> Obtained from: OpenBSD
* Fix a bug I introduced by some last-minute changes in -r 1.102. I endedgad2004-06-241-1/+1
| | | | | | up checking the wrong variable for NULL. Submitted by: bde
* Rework the logic for `-t <tty>', such that it accepts "ttyp0" and "console",gad2004-06-241-15/+43
| | | | in addition to "/dev/ttyp0" or "p0" and "/dev/console" or "co".
* Change "struct varent" to use the standard queue(8) macros, instead ofgad2004-06-235-32/+25
| | | | | | using it's own version of the same basic algorithm. Submitted by: part by Cyrille Lefevre, part of it done by me
* Add a check for defunct processes in saveuser(), so the output for "args"gad2004-06-231-10/+18
| | | | | | | (aka "command") will display "<defunct>", as does the output from "comm" for those processes. Also do better checking for malloc() failures. Submitted by: Cyrille Lefevre
* Avoid padding the value of "ucomm" when it is the last column in the line.gad2004-06-231-1/+4
| | | | Submitted by: Cyrille Lefevre
* Make sure the value of "upr" (scheduling priority on return from system call)gad2004-06-233-3/+15
| | | | | | is scaled in the same way that "pri" (scheduling priority) is scaled. Submitted by: Cyrille Lefevre
* Include the `-c' option in the usage() message.gad2004-06-231-1/+1
| | | | Submitted by: Cyrille Lefevre
* In the sorting routine, sort by thread-id if two processes have the same PID.gad2004-06-231-0/+2
| | | | Submitted by: Cyrille Lefevre
* Fix some style bugs I introduced pointed out by bde. Also add a blankdwmalone2004-06-231-15/+23
| | | | | | line after the empty variable declarations. Reviewed by: md5
* Use nanoseconds and then lexicographic ordering when the seconds ofdwmalone2004-06-221-6/+42
| | | | | | | | the [acm]time are the same. I was going to use Scott's patch, but I couldn't get the style quite right, so I used a patch of my own. Submitted by: Scott Mitchell <scott+freebsd at fishballoon.org> MFC after: 3 weeks
* Get rid of a cast to '(void) ' on the return of a call to strcpy.gad2004-06-221-1/+1
|
* Oops. Undo that last 'const' change. It expects similar changes to somegad2004-06-222-13/+11
| | | | other files that I am not ready to commit yet...
* Add 'const' to a few places.gad2004-06-222-11/+13
| | | | | PR: bin/65803 Submitted by: Cyrille Lefevre
* When displaying the "COMMAND" field for system-processes and/or kernelgad2004-06-222-1/+4
| | | | | | | | | | threads, put the command name in square brackets instead of parenthesis. This matches NetBSD, and also seems to be what linux does. The sentence which is added to the man page is taken straight from NetBSD. PR: bin/65803 Submitted by: Cyrille Lefevre Obtained from: NetBSD
* Have `ps' return the cputimes for zombies, with the assumption thatgad2004-06-211-1/+1
| | | | | | | kvm_getprocs() will provide useful information if it can, or *it* will provide a zero value if it can not find something appropriate. Submitted by: bde
* Add the `-O emul' format option, which prints the name of the system-callgad2004-06-203-0/+13
| | | | | | | | emulation environment the process is in. "emul" as a keyword is picked up from OpenBSD. PR: bin/65803 Submitted by: Cyrille Lefevre
* From SUSv3:gad2004-06-201-1/+1
| | | | | | | | | | | Any [standard output] field need not be meaningful in all implementations. In such a case a hyphen ('-') should be output in place of the field value So have the `-O label' option print out the string " -" if the process has no label. Approved by: Silence from rwatson and green (when asked in March...)
* Add new output-format keywords of LWP and NLWP, which show the thread-idgad2004-06-201-0/+8
| | | | | | | | | | and number-of-threads tied to a process. Result can be seen by typing, e.g.: ps -HO lwp,nlwp These new options are not documented yet. More options will be coming, and I will update the man page after I get farther along. PR: bin/65803 (though adjusted to fit our present source) Submitted by: Cyrille Lefevre
* Have the main() routine calculate %CPU and (if needed) memory informationgad2004-06-202-36/+31
| | | | | | | when copying per-process info before starting to sort the list. This way, sort-by-CPU or sort-by-memory will only calculate values once-per-process, instead of twice-per-comparison. Also take advantage of this to simplify the pscomp() routine.
* Typo: s/SunOP/SunOS/g.maxim2004-06-161-2/+2
|
* style.Makefile(5)obrien2004-06-131-2/+2
|
* If we are asked to print the total number of blocks, do so even if wedas2004-06-081-12/+14
| | | | | | | | | | | | | have no entries to print (either due to an empty directory or an error). This makes the -l and -s options more consistent, like Solaris and (Debian) Linux. To make this happen, tweak two optimizations on the second call to display(): - Don't skip display() altogether, even if list == NULL. - Don't skip the call to the printfn in display() if we need to print the total. PR: 45723
* Remove from the printfns the assumption that dp->list != NULL. Evendas2004-06-081-2/+6
| | | | | if there are no entries, these functions may be called to print the total number of blocks (0) for consistency's sake.
* Remove a duplicated description of the test for the null string.yar2004-06-071-5/+0
| | | | MFC after: 3 days
* Describe how test(1) will evaluate its expressions for a symlink.yar2004-06-071-1/+13
| | | | | Inspired by: SUSv3 MFC after: 1 week
* Plug file descriptor leak in implementation of -n option.tjr2004-06-051-0/+1
|
* Convert fsbtoblk() from a macro to a function. The redundantdas2004-06-041-8/+13
| | | | | | | | | | instances of 64-bit arithmetic were costing 775 bytes, and the inlining offered no benefit. Moreover, ambiguity as to the argument types led to the introduction of a bug (see rev 1.56). Also, remove some casts that are now clearly redundant. Inspired by: 67467
* Plug small memory leak.le2004-06-031-0/+1
| | | | | | PR: bin/67392 Submitted by: Matthew Emmerton <matt@gsicomp.on.ca> MFC in: 1 week
* Try to change the isdigitch() macro to something that Bruce won't rollgad2004-06-011-3/+3
| | | | | his eyes at quite so much... (actually someone else pointed this out to me a long time ago, but apparently I never fixed it)
* A few more style-fixes from Bruce. The only non-cosmetic changegad2004-06-011-16/+9
| | | | | | is to drop a call to setuid() which has not been needed for years. Noticed by: bde
* Since I'm not ready to add the non-standard ADD_PS_LISTRESET feature,gad2004-06-011-26/+1
| | | | | remove the #ifdef for it for now. I might add the feature for real at some later date, there isn't much reason for the #ifdef for now.
* Make a few style-istic improvements to the previous commits.gad2004-06-011-16/+15
| | | | Noticed by: bde
OpenPOWER on IntegriCloud