-1
votes
0answers
21 views

How to kill all process for a given user that take longer then x time

When I list processes with ps auxf I often see some that are stuck and I need to manually kill them. How can I do it with one command? Example ps result: $ ps auxf USER PID %CPU %MEM VSZ ...
3
votes
1answer
93 views

Troubleshooting DNS issue

I am trying to troubleshoot a DNS issue I am currently having with a new project host on an AWS EC2 instance. It is a brand new domain, and I have already updated the nameservers on the registrar ...
2
votes
3answers
279 views

how to convert a running process into a nohup and keep a logfile

I have a process currently occupying a terminal ]$ command some_argument I want to exit from the terminal and go home, but in the mean time I don't want to kill this running process. For the ...
0
votes
1answer
79 views

find all end subdirectories in a tree

given the following structure: oz123@debian:~/ $ tree . . ├── a │   ├── a1 │   ├── a2 │   └── a3 ├── a1 │   ├── a11 │   ├── a12 │   └── a31 ├── b │   └── b1 │   ├── b11 │   │   └── b21 │   ...
1
vote
2answers
92 views

Password Change With Command Line On NetBSD

How can I change root password with one line command on NetBSD? On FreeBSD, it's something like this echo "password" | pw mod user root -h 0 ;
-1
votes
1answer
562 views

Automate git-pull, stuck with keychain

I'd like to create a cronjob to automatically run a git-pull every minute. The problem is that my repo is private, I had to create keys on my system (Ubuntu Server 12.04). I installed keychain and ...
2
votes
1answer
118 views

Unix Command to timestamp the output of a file, but with the relative-to-when-it-started time?

There are numerous programmes (e.g. ts in moreutils), and various bash one-liners to prepend the output of a command/pipe with the timestamp of when that line was 'printed'. However is there a ...
3
votes
1answer
514 views

Removing a file whose name is the backslash character

I've somehow created a file called \ in a directory (yes, backslash character). I've tried all sorts of sed, find and grep fu but I just can't delete it! I know I could just delete the directory, but ...
1
vote
1answer
240 views

mysql command line show statements a sql script executes?

I'm a long time postgres user, but am now looking after maintenance for mysql databases. One thing that I'm used to from postgres, is when you run a sql script it will output on the command line what ...
0
votes
2answers
252 views

Unix wrapper to make any binary accept stdin/stdout redirection

This is a common situation: you want to include command 'foo' as part of a pipeline, but unfortunately command 'foo' only accepts actual filenames for I/O and does not read/write from stdin/stdout. I ...
2
votes
4answers
288 views

What happens when I kill a command with ctrl+c?

Specifically, I ran a rm -R /my/dir by mistake on a unix box (ubuntu 10.04). When I realized the horror within a few seconds I quickly killed it with the Ctrl+C command. It now seems I haven't lost ...
5
votes
5answers
20k views

How can I manually run a nagios check from the command line?

When defining and testing new services in nagios I have been restarting nagios, then clicking the service, and rescheduling a check for as soon as possible, then waiting until the check happens. Is ...
2
votes
1answer
42 views

Command to generate a file with a list of all files with name “.htaccess”

How do I write a command that searches the /var/www directory for all files with the name ".htaccess" and outputs the full location/path to each of the .htaccess files into a file? This would save me ...
0
votes
1answer
149 views

How can I run terminal commands at startup on a Mac OSX server?

For example, when the server boots I need to start Tomcat, and I need to start an Android emulator, and then issue some commands to it. These are on the path already. I'm familiar with Linux and ...
3
votes
4answers
213 views

What is the canonical /portable means of determining ONLY the ip of an interface

I'm writing some setup scripts/documentation and I want to dynamically set the listen ip for a service, given that I know that a particular network interface will be on a particular network. There are ...
2
votes
1answer
107 views

Change user permissions on files/directories where user = fred recursively

I was wondering if there is a way to change the owner permissions of a file only is the owner is currently "fred" for example, leave all groups the same. The reason for this is that I have recently ...
1
vote
1answer
1k views

how i can disable delete file option in unison sync tool?

i want to disable delete option of unison in other word i want unison tool always copy file [don't delete anything]. I read manual but i can not find what i need . for example we have two folder ...
1
vote
1answer
1k views

Create ZIP archive without storing permissions?

I am distributing packaged files in ZIP format. I use the following to create: zip -r distr.zip files/ When expanded on other UNIX system files preserve their permissions as they were when I packed ...
1
vote
3answers
411 views

how i can get the date in UNIX-aix and store ecah part in variable

I write batch file and i want to compare the modification time (timstap) to two folder and copy the latest one . i don't know if this option available directory be cause i don't know .so i want to get ...
3
votes
3answers
6k views

Why is “chroot” never used on Mac OS X?

I've been using Macs for 25 years, and "UNIX" since OS X 10.0.. but I've never really thought much about chroot, nor have I ever really needed or wanted to... It's a simple question, but... under ...
0
votes
3answers
527 views

Command to insert/prefix characters in lines after searching for a phrase from a file

Similar to a question posted by me here earlier, am looking for a help in Linux command that performs/does the following that is subtle different from my original question: Searches for a particular ...
0
votes
1answer
320 views

Command to delete specific lines after searching for a phrase from a file

Am looking for a help in Linux command that performs/does the following: Searches for a particular word/phrase case-insensitively in a given file, and then remove/delete the immediate next 'n' lines ...
-1
votes
3answers
395 views

unix command to remove empty lines in a file

How do I remove empty/blank (including spaces only) lines in a file in Unix/Linux using the command line ? contents of file.txt Line:Text 1:<blank> 2:AAA 3:<blank> 4:BBB 5:<blank> ...
0
votes
1answer
197 views

import configuration file when batch start ? (OS=Windows)

I write batch file and it has a large number of variable so i decided to put all variable on text file (conf.txt) and import it at the beginning of batch file so please i need the command line do this ...
-1
votes
1answer
72 views

Cygwin find integration

I would like to find all NON read-only files in my directory using cygwin's find command. Is it possible ?
-1
votes
2answers
152 views

How to configure Sendmail?

How can I learn to configure sendmail on Unix-aix? Note that I don't have a DNS server.
0
votes
1answer
2k views

i cannot send mail on unix aix?

i try to send e-mail but the following error appear :- bbb@ccc.com... User unknown /dead.letter... Saved message in /dead.letter how i can solve this error ????
4
votes
5answers
2k views

Command line SIP dialer

Is there a simple command line SIP dialer for unix which can connect to SIP server, make a call and play some media file (wav/mp3)? In ideal I would look like this: sip-dailer +1xxxxxxxxxx ...
0
votes
1answer
387 views

amount (share) folder in Unix-AIX by using smitty?

how i can amount folder in unix-aix by using smitty command ???
1
vote
4answers
125 views

Locate a particular string in a directory

I want to do the following: cat *.xml | grep some_string_here This tells me if a particular string exists in an xml file in a directory. Unfortunately it does not tell me which file. how can I do ...
3
votes
3answers
1k views

What's the difference between BSD-style and Unix-style command line options?

I tried to google it but to no avail. Can anybody help me with this?
0
votes
2answers
546 views

how i can create hidden folder in unix-AIX Version 6.1

I try this command mkdir .done but it does not work. How does one create a hidden folder?
1
vote
5answers
604 views

Is there a way I can queue long running tasks?

Is there a way I can do the following in a unix terminal: Start a long running process Add another long running process to start when the previous is done Repeat step 2 until I have queued the ...
1
vote
3answers
141 views

Unix one liner: Combine 2 headed files

If I have 2 files where the first lines contain identical headings: A.txt: A 1 aa B.txt A ee 7 I want to combine them like so: C.txt A 1 aa ee 7 Is there a one liner to do this?
2
votes
2answers
128 views

One liner to find if first lines of two files are identical

Is there a simple use of head and cmp (or otherwise) to achieve this?
0
votes
2answers
148 views

syntax of switch statment in Unix SunOS 5.9?

I have been searching for the proper Syntax to a switch statement for Unix SunOS. It seems I'm out of luck, perchance anyone can post an example?
0
votes
1answer
112 views

how i can send and get file by using sftp?

how i can send and get file by using sftp ????
0
votes
3answers
277 views

canceled sftp password Requests?

i write bash file contain sftp command ... but i have problem every time i execute bash sftp requests password of the remote server .. how i can give sftp password as default parameter ???
0
votes
2answers
934 views

sftp remotly copy in bash file “unix”?

how i can write bash file to copy files from unix box to windows "remotly" box by sftp command ???
0
votes
1answer
323 views

bash file to send an e-mail in unix?

i want to write bash file perform the following steps :- copy file from server1 to server2 if (copy success ) do nothing if (copy failed ) send e-mail to admin@company.com contain the following ...
-1
votes
1answer
250 views

how i can Find the files inside the folder and save the file names in variables?

how i can write bash file to Find files (number and name of files are variable) inside the folder and save the file names in variables ?
0
votes
2answers
383 views

command line tool to extract a token out of stdin stream?

I've been using this perl script to get a token out of stream on command line 1 #!/usr/bin/perl 2 3 $i = $ARGV[0]; 4 5 while (<STDIN>) { 6 @tokens = split /\s+/; 7 print ...
-1
votes
3answers
379 views

what is the difference between Linux and Unix “in general” and “command-line”? [closed]

if anyone can Summarized the difference between Linux and Unix in general and in command-line in particular
0
votes
2answers
699 views

How i can install samba to unix server?

How i can install samba to unix server ? .... for example i can install openssh-client in linux by the following command :- apt-get install openssh-client how i can install samba in unix .... by ...
-4
votes
1answer
132 views

Incremental backups of Subversion repositories

I have two SVN repositories, svn_rep1 and svn_rep2. I want to back them up to a remote server, with an incremental backup daily and a full backup monthly. How I can write a bash shell script to do ...
1
vote
2answers
109 views

execute bash file daily ? (OS=UNIX)

i want to execute bash file daily at 12:30 for example to make backup to something how i can do it ?? and other one monthly ???? the operating system is Unix
2
votes
3answers
150 views

Unix CLI-driven monitoring suite

I'm looking for something like Cacti or Zabbix, but driven from a command line. I hate clicking, I like scripting and shell automagic. I'm looking for some monitoring suite that would allow me to ...
0
votes
2answers
143 views

store the last part path of file in variable?

store the last part path of file in variable? i have path for example :- $1=/path1/path2/path3 i want to store path3 in variable x=path3 how i can do it in :- 1-windows 2-unix
0
votes
1answer
164 views

path as variable

BACKUP_SERVER_NAME="name" BACKUP_SERVER_USERNAME="user" COPY_FILE_TO_WINDOWS="/cygdrive/c/unix_test_copy" scp -r /$1/ $PRIMARY_SERVER_USERNAME@$PRIMARY_SERVER_NAME:$COPY_FILE_TO_WINDOWS how i can ...
0
votes
1answer
480 views

how i can check if the path (file) exist or not in unix bash?

i want to check a path if exist or not before pass it as argument