System resources ulimit sets an upper limit on system

This preview shows page 215 - 217 out of 373 pages.

System ResourcesulimitSets anupper limiton systemresources. Usually invoked with the-foption, which sets a limit onfile size (ulimit-f 1000limits files to 1 meg maximum). The-toption limits the coredump size(ulimit -c 0eliminates coredumps).Normally, the value ofulimitwould be set in/etc/profileand/or~/.bash_profile(seeChapter 27).umaskUser file creation MASK. Limit the default file attributesfor a particular user.All files created bythat user takeon the attributes specified byumask. The(octal) value passed toumaskdefines thethefile permissionsdisabled. Forexample,umask 022ensures thatnew files will have at most 755permissions (777 NAND 022).[42]Of course, the user may later change theattributes of particularfiles withchmod.The usual practiceis to set the value ofumaskin/etc/profileand/or~/.bash_profile(seeChapter 27).rdevGet info about or make changes to root device, swap space, or videomode.The functionality ofrdevhas generally been taken over bylilo, butrdevremainsuseful for setting up a ram disk. This isanother dangerous command, if misused.ModuleslsmodList installed kernel modules.bash$lsmodModuleSizeUsed byautofs94562 (autoclean)opl3113760serial_cs54560 (unused)sb347520uart40163840 [sb]sound583680 [opl3 sb uart401]soundlow4640 [sound]soundcore28006 [sb sound]ds64482 [serial_cs]i82365229282pcmcia_core459840 [serial_cs ds i82365]Advanced Bash-Scripting GuideChapter 13. System and Administrative Commands209
insmodForce insertion of a kernel module. Must be invoked as root.modprobeModule loader that is normally invoked automatically in a startup script.depmodCreates module dependency file, usually invoked from startup script.MiscellaneousenvRuns a program or script with certain environmentalvariables set or changed (without changing theoverallsystem environment). The[varname=xxx]permits changing the environmental variablevarnamefor the duration of thescript. With no options specified, this command lists alltheenvironmental variable settings.In Bash and other Bourne shell derivatives, it ispossible to set variables in asingle command's environment.var1=value1 var2=value2 commandXXX# $var1 and $var2 set in the environment of 'commandXXX' only.The first line of a script (the"sha-bang" line) may useenvwhen the path tothe shell or interpreter is unknown.#! /usr/bin/env perlprint "This Perl script will run,\n";print "even when I don't know where to find Perl.\n";# Good for portable cross-platform scripts,# where the Perl binaries may not be in the expected place.# Thanks, S.C.lddShow shared lib dependencies for an executable file.bash$ldd /bin/lslibc.so.6 => /lib/libc.so.6 (0x4000c000)/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)stripRemove the debugging symbolic references from an executablebinary. This decreases its size, butmakes debugging of itimpossible.

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 373 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
N/A
Tags
Beowulf, Shell, scripting language, Shell script, C shell

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture