Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
19 views

Send single email with multiple attachments from the shell with mail

I need to generate a single mail with different logs as multiple attachments in separated files. Is it possible to realize it only with traditional mail tool ?
0
votes
0answers
5 views

exchange 2007 mail contact export / import

Is there a shell command in Exchange 2007 to export the mail contacts located in Recipient Configuration > Mail Contact. we have recently started an AD forest migration and now it's time to do email ...
1
vote
4answers
53 views

Cancel shell command line recall

Pressing arrow key up will recall the command you have used before in shell. But what would you do if you on half way navigate through the history of your commands and you decide you want to type new ...
1
vote
2answers
27 views

mysql not to print selects output to terminal

Quick question: I have created come commands that will warm-up my DB. The thing is that those selects are large. When I do such a select I get all the "jiba-jaba" into my terminal window. How can you ...
3
votes
1answer
27 views

FTP: How to get rid of “WARNING! 1 bare linefeeds received in ASCII mode” message?

I wrote a little shell script (on CentOS) to download statistics from our APC UPS device. It works great, but everyday cron sends an email with this message: WARNING! 1 bare linefeeds received in ...
0
votes
0answers
35 views

Can I copy text from one file by shell? [migrated]

Can I copy text from one file by shell ? and I want to paste it to Browser later.
0
votes
1answer
13 views

Directory replication in New server

Scenario is to replicate all the directories,sub-directories,files,symbolic links present in Linux development Server to Linux QA Server. Lot of unix users also to be created. Consider an unix ...
0
votes
1answer
43 views

Lock down Solaris Shell Changing for normal users

I have a few dozen Solaris(5.10) boxes. By default, they are using ksh as the shell. Only a few users have sudo privileges. The rest do not. I don't want my regular users changing to another shell. ...
0
votes
3answers
33 views

shell script + match MAJOR and CRITICAL strings from log file

I need to match lines that have MAJOR and CRITICAL strings that comes after the word ERROR:< any integer number > please advice how to do that with one awk or sed command? more HW_Log.txt ...
2
votes
1answer
20 views

Dropping to cron like environment for debug purposes?

Cron scripts are executed in "limited" environment, PATH and co are very restrained. How can I emulate this env setting from interactive shell so that I could debug scripts that work great from user ...
0
votes
0answers
58 views

ksh + print the last value from parameter ( as $_ in perl)

I need advice - how to print the same last value in ksh scripts without to print param argument for example in perl last value is $_ , but we not have this option in ksh script example - of ksh ...
0
votes
0answers
60 views

Excluding Environment Variables from ZSH Autocomplete

Quick example: ~ $ wor<TAB> ~ $ WORDCHARS= ...
3
votes
3answers
75 views

Prevent 'cd' remembering symbolic links traversed

Say you have directory ~/mytool that softlinks to /usr/local/mytool. Then cd mytool leaves your current directory as ~/mytool, which may cause scripts to behave incorrectly. Is there a way to avoid ...
0
votes
1answer
42 views

linux + run script on other shell because script stuck - not return to linux prompt

In my Linux machine I have binary script (called transferNames.bin ) The problem is that when I run transferNames.bin with & script stuck and not returns to Linux prompt “#”, even if I wait 1 day ...
1
vote
3answers
79 views

linux + create simple watch dog process in shell script

I need to create watch dog process (will run in linux version 5.x) that look all time on /etc/cluster.cf file And if the process matches the string: machineA_is_active in the cluster.cf file Then ...
0
votes
2answers
133 views

How do I delete a matching line, the lines above and those below in the section?

In nagios config define service{ use generic-service host_name xxx.xxx.com service_description xxx Status check_command ...
0
votes
1answer
49 views

SSH connection gives no prompt, unresponsive

I'm ssh'ing from my OSX laptop to an OSX server. It worked a couple of days ago. Now, when I try and connect, no text is output. My session (with -v option) looks like: ~ $ ssh myserver ... ...
1
vote
4answers
88 views

run script as user who has nologin shell

All I need to do is to run a specific script as a particual user who does have the nologin/false shell indicated in /etc/passwd. I would run the script as root and this should run as another user. ...
0
votes
1answer
49 views

Assistance with a backup solution.

I am currently needing to create a backup of something on my server. I zip the entire folder and it's about 1.5gb big...it has to be backed up every hour.... Alright so the size of the backup is ...
0
votes
0answers
8 views

MySql shell command not replicated to slave [migrated]

I have a shell script that looks something like that: #!/bin/bash mysql -udb_user -pdb_password -e "LOAD DATA LOCAL INFILE '/srv/some_file.csv' INTO TABLE db_name.db_table FIELDS TERMINATED BY ...
3
votes
1answer
388 views

How do I shutdown the Host over ssh on ESXi 5 so it shuts down the guests properly?

I have ssh login to an ESXi 5 host. All the guests have vmware tools running, so they can be shut down by the host properly. I would like an equivalent for this menu option in vSphere client: It ...
1
vote
0answers
20 views

Is it possible to make scp fail when you do a local copy? [migrated]

Is it possible to make scp fail when you do a local copy? I find it annoying to accidently create files with names like 192.168.11.5 when I meant to type 192.168.11.5: and hence copying the file to ...
1
vote
1answer
51 views

shell script + add inside the script PATH for standard output

Usually if we want to redirect script output to file we simply do /etc/create_connection.sh > file.debug.txt Or /etc/create_connection.sh | tee –a file.debug.txt But What I want is ...
3
votes
2answers
66 views

How do I use sed or awk to remove text?

I have the following line in a file: Linux Release............5.4.2.0-02 12_12_2011_07:31:23 How do I remove all characters before the first number with sed or awk? I wish to get the ...
1
vote
1answer
98 views

What's the shell command of importing a sql into a db . (MySQL, CentOS w/ cPanel)

I have a big sql file (~ 60MB) exported from local development site, and I want to import to my server (running CentOS 5). Lets say the dump file is dump.sql, uploaded to the server. the database ...
1
vote
2answers
63 views

Shell script to start mysql server if not already running

I have a shell scipt and at some point I want to check if mysql is running and start it if it's not. I'm trying the following, but not having any luck: set mysqlstatus = `sudo ...
1
vote
2answers
34 views

PostgreSQL Backup WAL ShellScript

I need to do a script that will backup my psql databases, i want to use the wal archive mode and not pg_dump. I've wrote this from a script i found on the web : #!/bin/bash #Test Script BackupSQL ...
1
vote
3answers
148 views

Automatically find permission problems of a directory

I often have the problem that a program - e.g. apache - may not access a certain file or directory. Solving the problem means to manually check the file and every single directory in the path up to ...
2
votes
1answer
49 views

What does the leading dash in process cmdline mean?

I noticed a process taking full CPU on my linux server, of which the COMMAND column from top -c is -bash. cat /proc/<pid>/cmdline shows -bash too. What does the leading dash mean? More info: ...
3
votes
1answer
58 views

What happens when you 'delete' a file as opposed to securely shredding it?

I read that when you delete a file, depending on the situation, its possible to recover its contents. What happens on a hardware level when you you 'delete' a file, ex. $ rm myFile as opposed to ...
0
votes
3answers
146 views

How to get screen command to indicate what screen you're looking at for ubuntu servers?

When I use the screen command in red hat it lists what screen I'm looking at in putty However when I use the screen command in ubuntu 10.04 it doesn't list what screen I'm looking at in putty. Is ...
1
vote
6answers
216 views

Block some website in Linux machine

In my office all are using facebook and some other site that we don't want to be. Form the server pc, I used to share my net through the /ect/rc.local file. I edited the file with this line: ...
0
votes
2answers
48 views

Creating a backup script involving screens and java?

Hi guys I use centOS 64bit 5.7 and I need to create a backup script What I want it to do: screen -r example command into java pause for x amount of seconds exit screen zip/rar a folder which and ...
10
votes
3answers
169 views

piping a password and security

I sometimes do echo "secret" | mysql -u root -p .... Now I'm concerend about security here: can someone listing all processes see the password? To check I tried with echo "test" | sleep 1000 and the ...
0
votes
1answer
50 views

Rsync without password and different port to rssh shell

i was trying to Rsync without password to rssh shell using ssh-keygen and ssh-copy-id -i /root/.ssh/id_rsa.pub '-p 12345 user@example' but i couldn't got the following message This account ...
2
votes
2answers
85 views

Allow developers to access command line on linux server

Is there a way to create a shell user for developers to login to the server and execute command line php scripts to see the output? They have to be restricted to a folder. In other words, I don't ...
0
votes
1answer
45 views

remote keyboard not recognized

I'm logged into a remote server using putty ssh. The problem is that keyboard keys are not working as I was expecting. I'm talking about directional keys and tab. TAB is working as in MS Windows, ...
-1
votes
2answers
58 views

some good online PERL, LINUX [closed]

Looking some best free online terminal for get practice in SHELL and PERL having window based system does not having the linux and perl not installed, refer some best online emulator for linux shell ...
0
votes
1answer
62 views

Run command in detached tmux session

This is probably simple, but I really can't find out how you do it. I have read the man pages and googled without results. Problem: How do I run a command in a detached tmux window? Example: I want ...
0
votes
1answer
55 views

Shell script to change uid for user

I have a file (users_uid) with users and uid are two parameters as given below : users uid assds 611 dsdsd 612 xyzx 613 rerer 614 These users exist in the machine. I want ...
1
vote
3answers
90 views

Managing weekly backups

I have written a script which takes MySQL dumps and uploads it to Amazon S3. I have added the script to the cronjob and it runs at 2 o'clock in the midnight and uploads the MySQL dump to S3. I am ...
0
votes
2answers
53 views

mkdir: cannot create directory `../abc/2011-11-23: No such file or directory

I have got a sftp script that downloads the archives , unzip it and then rename the files according to date and moves it to respective folder. I had to move the script from USB drive onto a separate ...
0
votes
1answer
64 views

How to issue an rsh command in the background?

How to issue an rsh command to run in the background? Example: within a batch file i call rsh 10.1.1.2 -lroot /etc/rtcinst/myscript.ksh which runs on a remote unix machine. This script takes a ...
1
vote
1answer
51 views

my.cnf in server directory, why

On my Ubuntu machine, I have installed MySQL . I notice that there are /etc/my.cnf file which contain the content (only two lines): innodb_buffer_pool_size = 1G max_allowed_packet = 512M While ...
1
vote
4answers
154 views

From a shell script, how can I check whether a table in MySQL database exists or not?

I am trying to write a script which allows a user to select the what manipulation he needs to do on a table. I want to check if the table exists or not. If it exists I will continue the other things ...
0
votes
1answer
52 views

Linux Kernel Usb Printer Device Class driver

I am trying to update the CUPS daemon on my QNAP NAS, which runs a flavor of *nix. The entire OS system is loaded on a RAMDISK when the NAS boots so I've come up with a script that runs at start-up ...
0
votes
1answer
80 views

shell script within crontab

I can run the following shell script from command prompt as expected: /bin/sh -xv /home/shantanu/backup_transfer.sh But when I set it in a cron, it does not execute correctly. There are 2 ...
0
votes
1answer
59 views

pfSense command to delete stale SAD

I'm experiencing an issue with pfSense where duplicate SAD's are getting created after rekeying, forcing me to manually go ahead and delete the old SAD's. It's not a huge issue but it does get to be a ...
0
votes
2answers
126 views

How to secure svn+ssh checkout users?

All our SVN repositories are hosted on a dedicated machine on which all the developers have access. Every now and then we need to checkout a repository on a machine we don't own or operate ourselves. ...
0
votes
2answers
43 views

export command within shell script

When I use export command at command prompt, it works as expected. But it does not work from shell script. [root@server shantanu]# export myip=10 [root@server shantanu]# echo $myip 10 [root@server ...

1 2 3 4 5 12