Raza
  • Member for 9 years, 2 months
  • Last seen this week
How can I remove all comments from a file?
2 votes

You can use invert match like this: #grep -v "#" filename -v, --invert-match Invert the sense of matching, to select non-matching lines. (-v is specified by POSIX.)

View answer
What are some practical uses of STDIN redirection?
2 votes

Standard Input (stdin) Redirection In Linux, cat command is used to print the content of a file. However, if cat command is executed without any input argument then by default it tries to read from ...

View answer
sftp script to get a file from remote machine
2 votes

Another way to automate this process is to use expect script. Here is an example: for example: #!/usr/bin/expect -f spawn sftp ftpusername@phcsftp.pearsoned.com:/dir/file.txt expect "user@...

View answer
Error initializing server: OC4J administrator account is not configured
Accepted answer
2 votes

After re-installation of OS before applying any specific configuration I was able to start oc4j service. After narrowing it down to which configuration was exactly causing this not to start was came ...

View answer
How to increase the memory used by Java in linux?
2 votes

You will need to modify the vuze shell script. This shell script is actually a link to a file called azureus, vuze's previous name. Within this script change the line JAVA_ARGS="-Xmx128m" to JAVA_ARGS=...

View answer
How to monitor Memory utilization of the single process?
2 votes

Try this. if you want with program name mypid=`pidof programname` ; top -p $mypid OR top -p `pidof programname`

View answer
multiple ffmpeg library paths, how can exclude older ffmpeg installations?
Accepted answer
2 votes

You need to verify $PATH and $LD_LIBRARY_PATH environment variables. make sure they are point to correct version of ffmpeg and does not include older version if LD_LIBRARY_PATH is not already setup ...

View answer
add server name before filename with uname -n
Accepted answer
2 votes

You need to use backticks (`) before and after uname -n to insert the output of this command. This should do it: mv -f -v $oldfile /infanass/dev/admin/backup/\`uname -n\`${oldfile##*/}_$(date +%F-%...

View answer
LibreOffice from RPM looks ugly
Accepted answer
2 votes

This issue is caused by new accessibility option in LibreOffice 4. This option can be disabled by: Tools > Options under LibreOffice > Accessibility, disable Automatically detect high contrast mode ...

View answer
Change working directory
2 votes

not sure if I understand this right but -b will not change the root folder. It will put the temporary zip archive in the directory /home/cryus, copying over sql.zip to the current directory when done. ...

View answer
Can you create a volumegroup in LVM that all the Logical volumes created under it will be thin provisioned?
1 votes

Yes, You can create a volumegroup for thin provisioning. The following are the detail steps, copied from here: # pvcreate /dev/sdd Writing physical volume data to disk "/dev/sdd" Physical volume "/...

View answer
Odd Cygwin netstat output
Accepted answer
1 votes

Make sure that you are picking the correct netstat for your platform. which netstat will give you path where it is executing it from.

View answer
Browsers doesn't see aliases in /etc/hosts
1 votes

You need to make sure your system is configure to use host file for the dns by confirming /etc/nsswitch.conf file. It should look like #hosts: db files nisplus nis dns hosts: files nis ...

View answer
Debian: chgrp doesn't works properly on home folder
1 votes

I think you are confusing the first 2 with your user 2. The first 2 represent total number of hard links and then second 2 is your user and then group name either bin or 34 after you changes. Here is ...

View answer
URL Rewrite on debian not working
Accepted answer
1 votes

The default installation of Apache2 comes with mod_rewrite installed. To check whether this is the case, verify the existence of /etc/apache2/mods-available/rewrite.load. $ cat /etc/apache2/...

View answer
How to view second hard drive with Windows 7 in Linux
1 votes

You may need to install the following required packages which Centos by default does not support ntfs (Make sure you have the rpmforge repo installed) Install the following packages. ...

View answer
SCP Automation in production environment
1 votes

Following an article from here: You should setup SSH connection without Password Using ssh-keygen then it will allow you to use scp without prompting password or any other remote task: 3 Steps to ...

View answer
how to get exit status from command in expect script
Accepted answer
1 votes

I am guessing this. I didn't try it myself. Let's see if it works. expect_ACTIVATE=`cat << EOF` set timeout -1 spawn $VPNC expect : {send Pass123\r} expect "\\$ " send "status=`...

View answer
Configuring Real VNC on RHEL 6.3 Command Line
Accepted answer
1 votes

You need to start vnc session from your Linux account to be able to connect to your session, run vncserver from your command line of your Linux system. After you issue this command it will tell you ...

View answer
apt config file location
1 votes

If setting up the symbolic link on root is not an option in this case then here is another option for you: Since aptitude uses $HOME to store its configuration, you can temporary set HOME environment ...

View answer
CentOS VNC-Server
Accepted answer
1 votes

Here is a link for detail instruction on how to install a VNC-Server Summary: yum install vnc-server if you windows manager is not already installed then : yum groupinstall "GNOME ...

View answer
How do i change the password for root using webmin, where i have no more access as root?
Accepted answer
1 votes

you suppose to enter the password of user that you are trying to sudo from and make sure user has proper sudo access in visudo (/etc/sudoers)

View answer
What is the equivalent of telnet localhost 25 with ssh?
1 votes

Telnet equivalent are rlogin, rexec and rsh a secure alternative is SSH

View answer
Delete files except n files with the "bigger" name?
Accepted answer
1 votes

You can search oldest files and then you can check if total number of files are more then N files then delete oldest files first in a script or you can also simply use the following example. Let's say ...

View answer
How would I mount a linux shared folder on another linux system?
1 votes

You can use NFS export to share a folder On your Linux Server_1 where you want to share a folder do the following: echo /shared_folder *(rw,sync) >> /etc/exports /etc/init.d/nfs restart ...

View answer
Start and stop tomcat through ant script which is running in cygwin
1 votes

I think you need to correct the path to /cygdrive/d/apache-tomcat-6.0.36/bin

View answer
Forget where link is to custom conf file?
Accepted answer
1 votes

You can have multiple domain in virtual host confirmation on httpd.conf file and each domain can have separate folder. Here is an example: Listen 80 <VirtualHost *:80> DocumentRoot /www/...

View answer
What is the kerberos keytab file used for in UNIX/AD kerberos authentication?
1 votes

when you register a system with domain controller (net ads join), this will create a valid host principle for the system in /etc/krb5.keytab. This will create a computer object on AD. This object ...

View answer
Red5 can't find JAVA_HOME
Accepted answer
1 votes

On mine it shows cygdrive. I think you are missing "g" on cygdrive: export JAVA_HOME=/cygdrive/c/Program\ Files/Java/jdk1.6.0_32/ [edit: added the g in cygdrive path still missing]

View answer
How to realign a disk on logical volume with minimum to zero down time
Accepted answer
1 votes

Create new align partition DISK=/dev/sdd (assumed new disk is point to sdd) dd if=/dev/zero of=$DISK count=1 bs=1M parted -s -- $DISK mklabel msdos parted -s -- $DISK mkpart primary ext3 64s ...

View answer