12 tags on


  • All Sites

2 answers

How to fire VACUUM command using shell script in postgres

Here is my shell script #!/bin/bash psql --host= --port=5432 --dbname=SIEM --username=dbauser vacuumdb --analyze --verbose --table 'vuln' SIEM but its not working fine and ...

2 answers | 1 min ago by Gaurav Rajput on Stack Overflow
0 answers

Script to resize image only if bigger than original image

I want a command line or a script in linux (ubuntu) to resize folder of images only if the image is bigger than original image size. Thanks

1 answer

Executing bash script from perl program

i'm newbie with perl programming, I'm trying to write a perl program which will execute a bash script, the perl script look as follow: #!/usr/bin/perl use diagnostics; use warnings; require ...

1 answers | 10 mins ago by Cris on Stack Overflow
1 answer

Как сделать автоматическое монтирование расшаренной по сети папки с полными правами на изменение?

Сейчас в /etc/fstab прописано: // /mnt/exampleFolder cifs auto,user,iocharset=utf8,uid=1000,umask=000,username=john,password=pa$s 0 0 В итоге получается: ...

1 answers | 11 mins ago by abg on Stack Overflow на русском
0 answers

Trunc xml file using unix shell script

I need to select particular set of tags which contains a particular value inside the tag. For example, below is the source.XML file <main tag> <subTag1>1298</subTag1> ...

1 answer

This version of GitLab depends on gitlab-shell 2.6.3, but you're running Unknown. Please update gitlab-shell

While i am execute bundle exec rake db:migrate command in ubuntu i got this warning This version of GitLab depends on gitlab-shell 2.6.3, but you're running Unknown. Please update gitlab-shell.

5 answers

execute function with timeout

Why would this work timeout 10s echo "foo bar" # foo bar but this wouldn't function echoFooBar { echo "foo bar" } echoFooBar # foo bar timeout 10s echoFooBar # timeout: failed to run command ...

5 answers | 34 mins ago by speendo on Stack Overflow
1 answer

Netcat communication in JAVA

I am trying to to get a connection from an Java Application to a Server. I am able to get data from the server by typing in the shell: cat query.txt | nc server port Now i am trying to do the same ...

1 answers | 35 mins ago by zFr3eak on Stack Overflow
1 answer

Writing an alias that puts a folder and its subfolders/files into an encrypted archive titled with the date

I am trying to write an alias that puts a folder and its subfolders/files into an encrypted archive titled with the date the command is run. Preferably in format "YYYYMMDD FolderName Backup". E.g. ...

3 answers

Is there a way to store the current desktop layout?

What I want to be able to save the current positions of my applications, so when I'm going to open the same ones and run something they will rearrange as they were. For example if I'm going to open a ...

3 answers | 49 mins ago by Lipis on Ask Ubuntu
3 answers

Setting up a ssh-only jump box

I'm admining an AWS cluster, and am currently planning to run ssh access exclusively through a single jump box rather than dealing with public keys or LDAP authentication for ever-changing access ...

3 answers | 58 mins ago by Mikkel on Unix & Linux
3 answers

Could we do dynamic replace in bash shell?

Here we have 2 vars in bash shell ID="ABC" ID_STRING="Here is the [${ID}]" Is there any approach that we could dynamic replace the var ${ID} to "ABC" in the ID_STRING and echo to concole?

3 answers | 1 hour ago by user2613797 on Stack Overflow
1 answer

Replacing newline after a pattern in unix

I want to replace a newline with space after a pattern. For example my text is: 1. good movie (2006) This is a world class movie for music. Dir: abc With: lan , cer , cro I want above ...

2 answers

Set-uid root program that runs a program as the user “restrict” (follow-up)

See Set-uid root program that runs a program as the user "restrict" for context. I've written a very short program that is intended to run the program specified in its arguments (argv) as ...

0 answers

How to execute python code from perl program and use output of python code

I want to execute python script from perl code. I want to save python output to array and get some data from it. Python script will do some search in disk and locate files which I need. I will use ...

1 answer

Unix /Linux - several applications using the same environment variables but different values?

I am looking for some advice on the following below: I have several applications and tools on a server that requires the environment to be set up with variables etc for them to run. Many of these ...

1 answers | 1 hour ago by KeepLearning on Stack Overflow
8 answers

Replace string with substring in lowercase using sed / awk / tr / perl?

I have a plaintext file containing multiple instances of the pattern $$DATABASE_*$$ and the asterisk could be any string of characters. I'd like to replace the entire instance with whatever is in the ...

8 answers | 1 hour ago by BlueJ774 on Stack Overflow
2 answers

Print out lines have value great than 1 with awk

I was trying to pull out data in a file with any of the value in a line is great than 1. Do you guys know any easy way to do this? awk -F"\t" ...

2 answers | 2 hours ago by Ellie on Stack Overflow
1 answer

On Linux, FIND command with LS not showing proper result without option -d

I need to check all the files created in last day inside current folder which has million of files. If I used following command correct 80 or 90 files are shown. which is correct. find . -ctime -1 ...

1 answers | 2 hours ago by OutOfMemory on Stack Overflow
1 answer

Linux script sort and group without separator

Input is given as : 10001123 20001234 30002111 40003111 50004000 Requirement: Sort character from 2 to 5 Group by character from 2 to 5 Sum character 6 to 8 Only display line with character 6 to 8 ...

1 answers | 2 hours ago by William LAM on Stack Overflow
2 answers

Why doesn't alias work in AIX (Korn shell, .profile)?

I have these files in my home directory: drwxr-xr-x 3 meuser staff 256 Oct 12 13:11 . drwxr-xr-x 102 bin bin 4096 Sep 30 12:28 .. -rw------- 1 meuser staff ...

2 answers | 2 hours ago by jrara on Unix & Linux
0 answers

linux rpm installation - who define the rights ?

I am new to linux and is using rpm -i to install rpm package successfully. However, i do realize that i have to use root to install the package everytime. Assuming I have several users in the system ...

0 answers

Установка php-fpm CentOS

При попытке сконфигурировать выдает сообщение об ошибке: Please specify full path to php source dir: --with-php=DIR Сделал так, но не помогло: ./configure --enable-fastcgi --enable-fpm --with-zlib ...

0 answers

Implementing a custom cross-platform userspace filesystem with WebDAV instead of FUSE

Implementing a custom filesystem that works in userspace cross-platform seems like a daunting task - FUSE is great on linux, but awkward to install on OSX, and Windows doesn't support userspace ...

1 answer

tcp read() immediately after accept()

If I call send() immediately after synchronous connect() returns on the client side, is it reasonable to expect that calling read() immediately after accept() on the server side will return the first ...

1 answers | 3 hours ago by user1055568 on Stack Overflow
2 answers

Unix sed expression to find xml value

I have an XML file on my AIX system which has the following tag... <g:google_product_category> Health &amp; Beauty &gt; Personal Care &gt; Cosmetics ...

2 answers | 3 hours ago by Richie on Stack Overflow
1 answer

Выполнение действий без ввода sudo

Пользователя, находящегося в sudo группе, постоянно мучит 'Permission denied', нельзя даже папку создать без ввода 'sudo' перед 'mkdir'. Я помню, что это решалось парой каких-то действий по отношению ...

1 answers | 3 hours ago by fogipoziw on Stack Overflow на русском
0 answers

Grails shell not functional in Grails 3.0.2?

Grails now builds using gradle --which is great-- but a side effect seems to be the shell no longer works? When I run $ grails shell It doesn't appear to allow me to type any input, and cursor is ...

0 answers

terminal not working it wont let me put in my password

after I type in a command in to the terminal it ask for my password but when i try to type in my password nothing happens don't know where to go from here

2 answers

Grep multiple patterns and print a different number of lines below each of the patterns?

I am trying to find a way to grep/awk multiple patterns and then print a certain number of lines below the first pattern and a certain number of lines below the second pattern. For example ....

2 answers | 4 hours ago by pdm on Unix & Linux
15 30 50 per page
1 2 3