Hi all
How can I setup my shell so that I run a set of commmands or a script every time I login. I am using kshell. I tried putting a line in ./.bash_profile (does not work)
Ex.: I want to use vi as the commandline editor so, I want to run the command: set -o vi (3 Replies)
I'm new to unix and I have a fairly simple problem:
Lets say I am in a specific directory and I run the command: "dirs" ,
I get an output of all the folders that i pushed into the stack (as expected),
buut,
when when I create a script (called test):
#! /bin/csh
dirs
and then i run:... (2 Replies)
Hello,
We have a requirement to disable running shell commands via vi using "!".
Can anybody please suggest how to disable this option.
The requirement arises because we open up a xterm window with a config file in vi mode for the customer to edit. After the customer edits the config... (1 Reply)
Hello all,
i've written a small piece of code that will read commands from standard input and executes the commands.
Its working fine and is execting the commands well. Accepting arguments too. e.g
#mkdir <name of the directory>
The problem is that its not letting me change the directory i.e... (4 Replies)
Hi,
-How can I get number of files, cpu usage (percentage), memory usage, disk usage, ...etc, using C program ... I can use unix command ( system(command) )but I want the value to be returned back to my C program to use it in my code? How can I do that?
Thanks in advance ... (2 Replies)
Hi guys,
I know using system() we can run unix commands but the problem is, I can't get any returns with the system(). I am returning stuff from my shell scripts that I need to be able to read from my C code.
Anybody has cure to this problem? :))
Thanks (2 Replies)
Hello
I need to run some sed commands but it involves "/" in the substitute or delete, any ideas how I get round the problem.
Example:
cat file1.txt | sed -e '/</Header>/d' > file2.txt
This errors due to the forward slash before the Header text.
Thanks (3 Replies)
HI.
I am trying to run 2 commands, using the "for x in a b c d" loop but i am having a hard time coding it...
Here is what i have so far:
for SERVER in SERVERA SERVERB SERVERC SERVERD SERVERE
do
###############################################################################
#... (5 Replies)
Is there any way in a script to print out the commands being ran? In DOS script, there is the "@echo on" and "@echo off".
so I have a script like this:
#!/bin/ksh
echo "hello there. moving files."
<turn on echoing here>
cp thisfile.txt thatfile.txt
cp whatfile.prop whyfile.prop
<turn... (2 Replies)
I have a small question may be this will be discussed before
I have two files file1 and file2 with huge data and I am running the commands as
cat file1 |sort &
cat file2 |sort &
If the session is got disconnected or logout will this command run in background,
or shall we use nohup (3 Replies)
Discussion started by: morbid_angel
3 Replies
LEARN ABOUT BSD
ram
RAM(4) Kernel Interfaces Manual RAM(4)NAME
ram - ram disk driver
SYNOPSIS
/sys/conf/SYSTEM:
NRAM ram_size # RAM disk size (512-byte blocks)
major device number(s):
block: 3
minor device encoding:
must be zero (0)
DESCRIPTION
The ram pseudo-device provides a very fast extended memory store. It's use is intended for file systems like /tmp and applications which
need to access a reasonably large amount of data quickly.
The amount of memory dedicated to the ram device is controlled by the NRAM definition in units of 512-byte blocks. This is also patchable
in the system binary through the variable ram_size (though a patched system would have to be rebooted before any change took effect; see
adb(1)). This makes it easy to test the effects of different ram disk sizes on system performance. It's important to note that any space
given to the ram device is permanently allocated at system boot time. Dedicating too much memory can adversely affect system performance
by forcing the system to swap heavily as in a memory poor environment.
The block file accesses the ram disk via the system's buffering mechanism through a buffer sharing arrangement with the buffer cache. It
may be read and written without regard to physical disk records. There is no `raw' interface since no speed advantage is gained by such an
interface with the ram disk.
DISK SUPPORT
The ram driver does not support pseudo-disks (partitions). The special files refer to the entire `drive' as a single sequentially
addressed file.
A typical use for the ram disk would be to mount /tmp on it. Note that if this arrangement is recorded in /etc/fstab then /etc/rc will
have to be modified slightly to do a mkfs(8) on the ram disk before the standard file system checks are done.
FILES
/dev/ram block file
/dev/MAKEDEV script to create special files
/dev/MAKEDEV.local script to localize special files
SEE ALSO hk(4), ra(4), rl(4), rk(4), rp(4), rx(4), si(4), xp(4)dtab(5), autoconfig(8)DIAGNOSTICS
ram: no space. There is not enough memory to allocate the space needed by the ram disk. The ram disk is disabled. Any attempts to access
it will return an error.
ram: not allocated. No memory was allocated to the ram disk and an attempt was made to open it. Either not enough memory was available at
boot time or the kernel variable ram_size was set to zero.
BUGS
The ram driver is only available under 2.11BSD.
3rd Berkeley Distribution Januray 27, 1996 RAM(4)