Search This Blog

Showing posts with label command. Show all posts
Showing posts with label command. Show all posts

Thursday, June 1, 2023

Linux Ubuntu - SSH command to copy server to local or vice versa

 Copy file to Server to Local

    scp -P <port> <localfile path> <server user>@ip:<remote user home path>

    ex: > scp -P 22 mq/target/test.jar drvijay@192.2.2.2:/home/drvijay


Connect server : 

        ssh -p <port> <server user>@<IP>
        ssh -p 22 drvijay@182.2.2.2

Copy file from Server to Local
 





Note: ssh -p <port> small case for port option
          scp -P <port> upper -P for port specify.




Monday, October 5, 2020

Ubuntu - Maven - SSL Error while doing mvn clean install

sudo dpkg --purge --force-depends ca-certificates-java sudo apt-get install ca-certificates-java sudo update-ca-certificates -f

Tuesday, July 14, 2020

Install HP Printer in Ubuntu 20.04

Goto https://developers.hp.com/hp-linux-imaging-and-printing/gethplip
download the hplib with for your OS.

> cd /home/drvijay/Downloads/

> sudo chmod +x hplip-3.20.6.run
> ./hplip-3.20.6.run

or

> sudo apt install hplip-gui

#if any error, then below command will fix

> sudo apt install $(echo $(apt-cache search hplip | sed 's/ - .*$//g'))


















windows key -> type -> hp tool box

Wednesday, March 25, 2020

Thursday, March 19, 2020

Sunday, March 15, 2020

Eclipse or CMD Maven Quarkus Debug

[2 steps] #******** #Step 1 mvn -X clean -gs "../settings.xml" compile quarkus:dev -Ddebug
#step 2 #in eclipse, Go to Debug Configuration -> Remote Java Application -> Click new -> New Name "ex: Data Collector Remote" -> Type "socket", host "localhost" port "5005" -> Apply & Debug #Next time #First execute the Data Collector SVN with above command #Second execute the Debug As "Data Collector Remote"






Wednesday, January 22, 2020

Java CMD -D arguments Custom

Note your java class or jar name should be at last and not first before -D.

Ex:
YES = java -jar -Dfiles=c1 -Dexcludes=va2 filename.jar
NO = java -jar filename.jar -Dfiles=c1 -Dexcludes=va2


In Program
Properties systemProperties = System.getProperties();
System.out.println( systemProperties.get ( "files" ) );
System.out.println( systemProperties.get ( "excludes" ) );


Tuesday, November 28, 2017

Cassandra Group By clause in Select command

1. Go to C:\Program Files\DataStax-DDC\apache-cassandra\conf\cassandra.yaml
change false to true

enable_user_defined_functions: true


2. Paste below functions in cqlsh window

CREATE OR REPLACE FUNCTION state_group_and_count( state map, type text )
CALLED ON NULL INPUT
RETURNS map
LANGUAGE java AS '
Integer count = (Integer) state.get(type);  if (count == null) count = 1; else count++; state.put(type, count); return state; ' ;

CREATE OR REPLACE AGGREGATE group_and_count(text)
SFUNC state_group_and_count
STYPE map 
INITCOND {};


3. execute the query like below

--select group_and_count(column) from table;
-- ex
-- select group_and_count(item) from skutable;



4. you may see like this 
Failed to format value OrderedMapSerializedKey([(u'xxx', 4)]) : 'NoneType' object has no attribute 'sub_types'
this is a cqlsh error. so you can try from programming languages like java..., it may work perfectly.

Hit Counter


View My Stats