Linux

65K

Solutions

33K

Contributors

Linux is a UNIX-like open source operating system with hundreds of distinct distributions, including: Fedora, openSUSE, Ubuntu, Debian, Slackware, Gentoo, CentOS, and Arch Linux. Linux is generally associated with web and database servers, but has become popular in many niche industries and applications.

Share tech news, updates, or what's on your mind.

Sign up to Post

I'm not a Java programmer, but my boss tasked me with getting someone else's code running. Sorry for the noob question.

I have the code running perfectly via `Eclipse` on my OSX system. However, the need is for it to be running from the command line.

I'm trying to run the code on my OSX box that was compiled by eclipse when I ran it there.

I've set up the environment as best I can. But when I attempt to run the *.class files, I get...

    init mikes$ pwd
    /Users/(snip)/Eclipseworkspace/Anonymize/bin/init

    init mikes$ java Init.class
    Error: Could not find or load main class Init.class

    init mikes$ java ./Init.class
    Error: Could not find or load main class ..Init.class

`main` is definitely in Init.class

**Init.java**

    package init;
   
    import java.io.File;
    import java.io.IOException;
    import java.nio.file.Files;
    import java.nio.file.Path;
    import java.nio.file.Paths;
    import java.util.stream.Stream;
    import java.net.*;
   
    import anonymizer.Anonymizer;
   
    public class Init  {
          
          public static String STOPWORDS;
          (...snip...)

          static {
                // Define location of resource files
                 STOPWORDS = "misc" + File.separator + "stopwordlist_de.txt";
            (...snip...)
          }
          
          public static void main(String[] args) throws IOException {            
                if (args.length !=1) {
                      System.err.println("Usage: Anonymize <path to docx files>");
 …
1
Big Business Goals? Which KPIs Will Help You
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

What is the issue if we keep the default apache port open in a server.
0
If my rsyslog.conf is configured to write *.info *.warn *.kern and some others to /var/log/messages is there any way to identify the local6 *.info messages apart from the *kern and *.warn and others in  /var/log/messages? I've noticed sometimes that the messages contain kern and warn but not just sure what *.info are and if there's an easy way to identify them
I'd rather not have to configure /etc/rsyslog.conf to have another log file for just *.info if it can be avoided. If there's no other way then I might just have to do it but I'm curious what the local 6 information messages actually are.
0
Does anyone know How can I see the interface up and down logs in the ubuntu 18.4? there should be something like /var/log/dmesg shows logs
0
I have several linux systems. Normally I login on them with my account, and after I login i execute sudo -s, so I can get admin privileges.
Sometimes I need to edit some files or copy some files out of the linux systems and in the past I ofter used the winscp program.
Unfortunately when I login with winscp with my account I don't have admin privileges, and thus I am not able to open and edit needed files, I am not able to copy files out of the system. Can you tell me how to login with winscp with admin privileges
0
I'd like to determine in my bash script which NIC the default gateway is on in order to determine if i need to add static routes via the script or not. Since there are two instances of 0.0.0.0 in the routing table where the default gateway is I'n trying to determine the NIC mentioned in the routing table where there are two instances of 0.0.0.0. Then if it matches ${DftNic} below I no I won't have to add static routes on the server. Scratching my head on this so any help would terrific.

DftNic=$(ip route show | grep default  awk '{print $7}')
0
Hi,

I have a linux based system where I incorrectly assigned the MAC address within U Boot.
Unfortunately "setenv ethaddr" is disabled in this version (Can't overwrite "ethaddr")

Is there an alternative way to remove this environment variable without using the standard command?

Any ideas would be appreciated.

Many thanks,

James
0
Dear EEs, is there any free software for Linux which can serve similar like Online Office server in Window?

We'd like to edit document online on web browser on OwnCloud.

Many thanks!
0
Dear Wizards, I'm testing the owncloud in Ubuntu 14 but got these troubles:
1. the LDAP features are unavailable, I tried to reboot server but it did not help, we had php5-ldap packages

oc2.PNG
oc1.PNG

2. Can we edit documents online like GoogleDrive?

Can anyone help please? Many thanks!
0
Dear Experts

it is observed the  crm application running on LAMP stack often crashes, users unable to use the application webserver is on one server and database mysql 5.5 is on another server did perform the mysql tuner and attached is report, the system has 64G RAM as per the recommendations from mysql tuner can I set my.cnf as per the following, please suggest
total physcial ram capacity is 64G
based on the mysql tuner recommendations should I have to to set as per the below
innodb_buffer_pool_size = 55.2G
innodb_log_file_size= 25% of above i,e 55.2 which is 13.75G
please suggest can I change in my.cnf as above.
mysql-tunerlog.txt
0
Determine the Perfect Price for Your IT Services
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

How do I update BIOS on Centos?

I'm running Centos 7 on a Lenovo m83 and I can't figure out how to update the bios. I'm very new to Linux so if anyone can help me out I'd appreciate it.

https://support.lenovo.com/us/en/downloads/ds035753

I downloaded fbj9d1usa.iso from the site, threw it onto a flash drive, and now I can't figure out how to navigate to it or run it.
0
please advise the clear steps..
How to make log rotation by file size in apache-tomcat
0
Hi Experts,

     I had build and run a docker image like this.

docker build -t harvest-trove:1.0.3 .
docker run --name trove_pull ${trove_environment[@]} -d -restart always harvest-trove:1.0.3 start pull                 

Open in new window


I want to use docker compose for the above two commands

I had created the docker compose like this.

version:'3'
services:
   harvest-trove:
      build: .
      image: harvest-trove:1.0.3
      volumes:
                -  .:/home/trove
           env_file:
        -  web-variables.env
            command: python3 manage.py migrate
  trove-pull:
    container_name:trove-pull     
    image: harvest-trove
    env_file:
       - web-variables.env
       depends_on:
         - harvest-trove
       command: harvest-trove:1.0.3 start pull
       restart:always

Open in new window


when I run docker-compose up I get the following error.

error with docker-compose up
Please help me in fixing this issue.

With Many thanks,
Bharath AK
0
Hi EE,

Running the command:

ss -t | grep 22


Result:

State      Recv-Q Send-Q                                         Local Address:Port                                             Peer Address:Port
ESTAB      0      0                                                  127.0.0.1:59392                                               127.0.0.1:38537
ESTAB      0      52                                              10.2.112.119:ssh                                                10.98.4.13:64686
ESTAB      0      0                                                  127.0.0.1:38537                                               127.0.0.1:59392
ESTAB      0      0                                                  127.0.0.1:59392                                               127.0.0.1:38535
ESTAB      0      0                                                  127.0.0.1:38535                                               127.0.0.1:59392

What is the correct syntax for only displaying connections that are using port 22 for comms?

Any assistance is welcome.

Thank you.
0
Hi EE,

Trying to find the OS name of a very old version of Linux the two commands I have run are below:

uname -r
2.6.32-358.el6.x86_64

uname -a
Linux uch-crhotp-01 2.6.32-358.el6.x86_64

Any other commands I could run that could give the OS name and version?

Any assistance is appreciated.

Thank you.
0
How do you append the output value of a command  that is run plus the value of other variables to a log file in a bash script?
This is what I have just now

#!/bin/bash
host=$(hostname)
date=$(date '+%d%m%Y:%H%M)
log="installlogfile.txt"
runbinary  2>&1 | tee -a ${installlogfile.txt}  <- instead of this i want to be able to append also ${date} and ${host} to the installlogfile.txt but tee -a with multiple variables doesn't work. Any ideas on how to do this in bash would be much appreciated. If i echo or print the variables before i run the command there would be newline characters and I would like the output in the log file to be $(hostname) ${date} output from the command.
0
previous answer to
https://www.experts-exchange.com/questions/29117145/non-www-version.html

If you mean what I think you do, you can set up a .htaccess file to do this. In there, you can create a rule to redirect users to a specific url. So, if they type in www.yoursite.com it will redirect to http://yoursite.com

can I do this with my server
0
linux shared server
want to have one version (non www) of small one page website

I have ftp access.

is this something I can do in root folder
0
I'm having trouble with an Expect script on Red Hat Enterprise Server 6.10.  I would think that the script below would spawn SFTP, then send the password.  I'm getting a Password error, which I am guessing is due to lots of escapable characters.

The script below gets me a "permission denied" error.  My password ( I changed some characters) is something like  r10@4g@$^#a&r*a^^$%  .  I have tried escaping the 'special' characters with \ and also tried escaping every character (so it looks like \r\1\0\@\4\g\@\$\^\#\a\&\r\*\a\^\^\$\%).  When I manually connect to the site and manually enter a password it works fine.

Can someone tell me what I might be missing?

Thanks for any advice you can provide,

-Dan

#!/usr/bin/expect
spawn sftp username@ftpprd.host.com
expect "username\@ftpprd.host.com\'s password: "
send "r10@4g@$^#a&r*a^^$%\n"


T
0
Microsoft Azure 2017
LVL 12
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Can someone provide the name of some open source software that can assist with web utilization, os utilization virtualization and security vulnerabilities. It does not have to be all the same software. This is for linux and windows OS.
1
I've got three machines:
1. Linux PC:
    - NIC #1: 192.168.0.241, netmask 255.255.255.0, gateway: 192.168.0.100
      (so this is connected over a switch to the Windows machine (2.))
2. Windows 10 PC:
    - NIC #1: 192.168.0.100, netmask 255.255.255.0, no gateway
    - NIC #2: 10.16.109.100, netmask 255.0.0.0, gateway: 10.254.0.230
3. Linux machine
    - NIC #1: 10.254.0.230, netmask 255.0.0.0, gateway: 10.254.0.1 (Internet)

What do I have to do on which machine to get access from the Linux machine (1.) to the 10.x.x.x network (over the Windows machine (2.)?
I got above scenario working with Internet Connection Sharing on the Windows machine (2.) sharing its NIC #2 on its NIC #2.
However, it is extremely buggy (when restarting the Windows machine it is not working, have to switch on/off to make it work again, etc.)
So, I need a different solution just based on a few static routes perhaps?
Many thanks in advance,
Michael
0
How to download awscli docker image  (I try docker run awscli it ask password without that is it possible)

How to download mariaDB docker image  (I try docker run mariaDB it ask password without that is it possible)
0
Installed Ubuntu 16.04 LTS and trying to install Unifi Controller for our switches.

I get the following error. Still new to linux side.  Any thoughts?


Capture.PNG
0
We are looking into writing a basic service on a Windows server that takes a text string and sends it to a service running on a Linux server.  The Linux server then needs to call another local application, take the response from that application and send a text string back to the Windows server.  

I've not done this before (although I'm fairly comfortable with C#), but could really do with a good starting point on the Linux side of things.  For example, are there any services built into Linux that would facilitate this (or third party products etc)?

In short - I just need a bit of guidance to start off with.,=
0
Hi Experts,

I have linux script which is working fine for creating password protected zip file (zip file will contain csv file) .Please find the same below.
Zip -e -rj zipfilename.zip  /input/file/path/*.csv 

Open in new window


This command will ask user input ,ie password.It will be like below.
Enter password:

Open in new window


 we need to provide password..Then it will ask for confirmation like this
Verify password:

Open in new window

again we need to provide password..Done..It will create a password protected zip file.

Now I need to automate this script..It should not ask for user input..
Can anyone help me how to write script for automating this task.
Any help regarding this would be highly appreciated.

Thanks in Advance.
0

Linux

65K

Solutions

33K

Contributors

Linux is a UNIX-like open source operating system with hundreds of distinct distributions, including: Fedora, openSUSE, Ubuntu, Debian, Slackware, Gentoo, CentOS, and Arch Linux. Linux is generally associated with web and database servers, but has become popular in many niche industries and applications.