Search Results

Search: Posts Made By: bankai
4,932
Posted By bankai
It can't find the 'sudo' command, it either...
It can't find the 'sudo' command, it either doesn't exist or your PATH is set incorrectly

I would highly suggest you not use 'sudo' in a shell script, it's bad practice
Forum: Programming 07-28-2010
1,538
Posted By bankai
gah, wanna quote your code a bit better next time...
gah, wanna quote your code a bit better next time ?
Forum: Linux 07-28-2010
14,830
Posted By bankai
VAR=`grep -n "text" <file>`
VAR=`grep -n "text" <file>`
4,088
Posted By bankai
On my Solaris system the 'adm' user performs...
On my Solaris system the 'adm' user performs actions on the accounting information. In order to rotate the logs, the 'adm' user needs to have write access to the /var/adm directory.


# ls -ald...
2,278
Posted By bankai
How big is the file system? Check for core...
How big is the file system?

Check for core dumps in /var/crash/`hostname`/
Forum: Solaris 07-27-2010
5,090
Posted By bankai
It's looking for Libintl, do you have this...
It's looking for Libintl, do you have this installed?
1,509
Posted By bankai
If you're using modules ( CPAN or other ) you can...
If you're using modules ( CPAN or other ) you can bundle them together with your code in an extractable tar file. Then set your @INC appropriately in your perl code.

eg.

app_dir/
lib/...
9
2,929
Posted By bankai
Yes, this is done by setting the EDITOR variable ...
Yes, this is done by setting the EDITOR variable


$ export EDITOR=emacs
$ crontab -e
9
2,929
Posted By bankai
Look at the man page for 'crontab' 'crontab...
Look at the man page for 'crontab'

'crontab -e' to edit the crontab
'crontab -l' to list the contents of your crontab



This entry is fine but if your shell script is set to be executable,...
Forum: Solaris 07-26-2010
2,951
Posted By bankai
You can check this with the 'file' command ...
You can check this with the 'file' command


# file /usr/bin/sh
/usr/bin/sh: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, stripped


Depending on the application whether...
Forum: Solaris 07-25-2010
4,510
Posted By bankai
I've never done a raidz before, but is mirroring...
I've never done a raidz before, but is mirroring an option ?

Failing that, you could do a zfs send/receive ....
Forum: Solaris 07-25-2010
3,572
Posted By bankai
To further the post above, you will probably want...
To further the post above, you will probably want to put this in /etc/vfstab to ensure the swap file persists reboots
Forum: BSD 07-25-2010
3,244
Posted By bankai
If you're concerned about speed, use portsnap....
If you're concerned about speed, use portsnap. It's now in the default installation and is the suggested way to update your tree. In saying that, csup and cvsup still essentially do the same thing...
Forum: Solaris 07-23-2010
2,083
Posted By bankai
Take a look at: prtconf prtdiag cat...
Take a look at:

prtconf
prtdiag
cat /etc/path_to_inst
2,067
Posted By bankai
Read the man page for your shell, it's explained...
Read the man page for your shell, it's explained there
2,067
Posted By bankai
for i in $(cat Filename.txt) do echo "$IFS...
for i in $(cat Filename.txt)
do
echo "$IFS $i"
done


Look at the example, why are you printing the IFS?

You need to set the IFS to a new line character -- this is not the default action.
2,067
Posted By bankai
Scripts should be written with portability in...
Scripts should be written with portability in mind, hence the use of bourne syntax is highly advised
2,067
Posted By bankai
Set your input field separator $ ...
Set your input field separator


$ IFS=$'\n'
$ for i in `cat file_name`
>do
>echo $i;
>done
7,448
Posted By bankai
You have two choices in a situation like this: ...
You have two choices in a situation like this:

Setup a port forward from site A to site B, then VNC through that

from site A

# ssh -L 8080:windows_machine:vnc_port site_B
# vncviewer...
1,677
Posted By bankai
you can use 'dirname' on a fully qualified path...
you can use 'dirname' on a fully qualified path to get the directory name.

'basename' will do the opposite


eg.

# dirname /path/to/file
/path/to



# basename /path/to/file
file
Forum: Solaris 07-14-2010
30,212
Posted By bankai
The following will lock an account sudo passwd...
The following will lock an account
sudo passwd -l <username>

You could also change the users shell to /bin/false if you don't want them to log in

sudo usermod -s /bin/false <username>
1,528
Posted By bankai
remove the space before the '='
remove the space before the '='
2,167
Posted By bankai
Even though you have your answer, the last...
Even though you have your answer, the last reboot/boot time can be found with the 'last' command
2,776
Posted By bankai
Find all lines starting with a number, place that...
Find all lines starting with a number, place that in buffer one. Then write 63 followed by buffer one



Find all lines starting with a number and replace the start of line with 63



Find...
2,776
Posted By bankai
Try something like this sed...
Try something like this

sed 's/\(^[0-9]\)/63\1/' <file>
Showing results 1 to 25 of 48

 
All times are GMT -4. The time now is 08:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy