Search Results

Search found 3548 results on 142 pages for 'unix'.

Page 15/142 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • scripting in awk

    - by benjamin button
    I have a text file with contents as below: 1,A,100 2,A,200 3,B,150 4,B,100 5,B,250 i need the output as : A,300 B,500 the logic here is sum of all the 3rd fields whose 2nd field is A and in the same way for B how could we do it using awk?

    Read the article

  • FTP to SFTP in shell scripting

    - by Kimi
    This script is to connect to different servers and copy a file from a loaction defined. It is mandatory to use sftp and not ftp. #!/usr/bin/ksh -xvf Detail="jyotibo|snv4915|/tlmusr1/tlm/rt/jyotibo/JyotiBo/ jyotibo|snv4915|/tlmusr1/tlm/rt/jyotibo/JyotiBo/" password=Unix11! c_filename=import.log localpath1=`pwd` for i in $Detail do echo $i UserName=`echo $i | cut -d'|' -f1` echo $UserName remotehost=`echo $i | cut -d'|' -f2` echo $remotehost remote_path=`echo $i | cut -d'|' -f3` echo $remote_path { echo "open $remotehost user $UserName $password lcd $localpath1 cd $remote_path bi prompt mget $c_filename prompt " } |ftp -i -n -v 2>&1 done I want to do the similar thing using sftp instead of ftp.

    Read the article

  • Regarding grep in solaris

    - by Arav
    I want grep for a particular work in multiple files. Multiple files are stored in variable testing. TESTING=$(ls -tr *.txt) echo $TESTING test.txt ab.txt bc.txt grep "word" "$TESTING" grep: can't open test.txt ab.txt bc.txt Giving me an error. Is there any other way to do it other than for loop

    Read the article

  • First Come, First Served process scheduling

    - by user253530
    i have 4 processes: p1 - bursts 5, priority: 3 p2 - bursts 8, priority: 2 p3 - bursts 12, priority: 2 p4 - bursts 6, priority: 1 Assuming that all processes arrive at the scheduler at the same time what is the average response time and average turnaround time? For FCFS is it ok to have them in the order p1, p2, p3, p4 in the execution queue?

    Read the article

  • Regarding Shell variable

    - by arav
    I need to call another shell script testarg.sh within my main script. This script testarg.sh has arguments ARG1 ,ARG2, ARG3. I need to call up the below way ./testarg.sh -ARG1 -ARG2 -ARG3 ARG1 and ARG3 argument Variables are mandatory ones. If its not passed to the main script then i quit. ARG2 is an optional one. If the ARG2 variable is not set with value or it's not defined then i need not pass it from main script.So i need to call up the below way ./testarg.sh -ARG1 -ARG3 If the value exist for the ARG2 Varibale then i need to call the below way ./testarg.sh -ARG1 -ARG2 -ARG3 Do i need to have a if else statement for checking the ARG2 variable is empty or null. Is there any other way to do it.

    Read the article

  • Regarding PID Shell Script

    - by arav
    I am calling another shell script testarg.sh within my main script. the logfiles of testarg.sh are stored in $CUSTLOGS in the below format testarg.DDMONYY.PID.log example: testarg.09Jun10.21165.log In the main script after the testarg process gets completed i need to grep the log file for the text "ERROR" and "COMPLETED SUCCESSFULLY". How do i get the PID of the process and combine with DDMONYY for grepping. Also i need to check whether file exists before grepping $CUSTBIN/testarg.sh $CUSTBIN/testarg.sh rc=$? if [ $rc -ne 0 ]; then return $CODE_WARN fi

    Read the article

  • FDs not closed in FUSE filesystem

    - by cor
    Hi, I have a problem while implementing a fuse filesystem in python. for now i just have a proxy filesystem, exactly like a mount --bind would be. But, any file created, opened, or read on my filesystem is not released (the corresponding FD is not closed) Here is an example : yume% ./ProxyFs.py `pwd`/test yume% cd test yume% ls mdr yume% echo test test yume% ls mdr test yume% ps auxwww | grep python cor 22822 0.0 0.0 43596 4696 ? Ssl 12:57 0:00 python ./ProxyFs.py /home/cor/esl/proxyfs/test cor 22873 0.0 0.0 6352 812 pts/1 S+ 12:58 0:00 grep python yume% ls -l /proc/22822/fd total 0 lrwx------ 1 cor cor 64 2010-05-27 12:58 0 - /dev/null lrwx------ 1 cor cor 64 2010-05-27 12:58 1 - /dev/null lrwx------ 1 cor cor 64 2010-05-27 12:58 2 - /dev/null lrwx------ 1 cor cor 64 2010-05-27 12:58 3 - /dev/fuse l-wx------ 1 cor cor 64 2010-05-27 12:58 4 - /home/cor/test/test yume% Does anyone have a solution to actually really close the fds of the file I use in my fs ? I'm pretty sure it's a mistake in the implementation of the open, read, write hooks but i'm stucked... Let me know if you need more details ! Thanks a lot Cor

    Read the article

  • Binding on a port with netpipes/netcat

    - by mindas
    I am trying to write a simple bash script that is listening on a port and responding with a trivial HTTP response. My specific issue is that I am not sure if the port is available and in case of bind failure I fall back to next port until bind succeeds. So far to me the easiest way to achieve this was something like: for (( i=$PORT_BASE; i < $(($PORT_BASE+$PORT_RANGE)); i++ )) do if [ $DEBUG -eq 1 ] ; then echo trying to bind on $i fi /usr/bin/faucet $i --out --daemon echo test 2>/dev/null if [ $? -eq 0 ] ; then #success? port=$i if [ $DEBUG -eq 1 ] ; then echo "bound on port $port" fi break fi done Here I am using faucet from netpipes Ubuntu package. The problem with this is that if I simply print "test" to the output, curl complains about non-standard HTTP response (error code 18). That's fair enough as I don't print HTTP-compatible response. If I replace echo test with echo -ne "HTTP/1.0 200 OK\r\n\r\ntest", curl still complains: user@server:$ faucet 10020 --out --daemon echo -ne "HTTP/1.0 200 OK\r\n\r\ntest" ... user@client:$ curl ip.of.the.server:10020 curl: (56) Failure when receiving data from the peer I think the problem lies in how faucet is printing the response and handling the connection. For example if I do the server side in netcat, curl works fine: user@server:$ echo -ne "HTTP/1.0 200 OK\r\n\r\ntest\r\n" | nc -l 10020 ... user@client:$ curl ip.of.the.server:10020 test user@client:$ I would be more than happy to replace faucet with netcat in my main script, but the problem is that I want to spawn independent server process to be able to run client from the same base shell. faucet has a very handy --daemon parameter as it forks to background and I can use $? (exit status code) to check if bind succeeded. If I was to use netcat for a similar purpose, I would have to fork it using & and $? would not work. Does anybody know why faucet isn't responding correctly in this particular case and/or can suggest a solution to this problem. I am not married neither to faucet nor netcat but would like the solution to be implemented using bash or it's utilities (as opposed to write something in yet another scripting language, such as Perl or Python).

    Read the article

  • Why fork() before setsid()

    - by corentin.kerisit
    Why fork() before setsid() to daemonize a process ? Basically, if I want to detach a process from its controlling terminal and make it a process group leader : I use setsid(). Doing this without forking before doesn't work. Why ? Thanks :)

    Read the article

  • samba sync password with unix password on debian wheezy

    - by Oz123
    I installed samba on my server and I am trying to write a script to spare me the two steps to add user, e.g.: adduser username smbpasswd -a username My smb.conf states: # This boolean parameter controls whether Samba attempts to sync the Unix # password with the SMB password when the encrypted SMB password in the # passdb is changed. unix password sync = yes Further reading brought me to pdbedit man page which states: -a This option is used to add a user into the database. This com- mand needs a user name specified with the -u switch. When adding a new user, pdbedit will also ask for the password to be used. Example: pdbedit -a -u sorce new password: retype new password Note pdbedit does not call the unix password syncronisation script if unix password sync has been set. It only updates the data in the Samba user database. If you wish to add a user and synchronise the password that im- mediately, use smbpasswd’s -a option. So... now I decided to try adding a user with smbpasswd: 1st try, unix user still does not exist: root@raspberrypi:/home/pi# smbpasswd -a newuser New SMB password: Retype new SMB password: Failed to add entry for user newuser. 2nd try, unix user exists: root@raspberrypi:/home/pi# useradd mag root@raspberrypi:/home/pi# smbpasswd -a mag New SMB password: Retype new SMB password: Added user mag. # switch to user pi, and try to switch to mag root@raspberrypi:/home/pi# su pi pi@raspberrypi ~ $ su mag Password: su: Authentication failure So, now I am asking myself: how do I make samba passwords sync with unix passwords? where are samba passwords stored? Can someone help enlighten me?

    Read the article

  • Relay Access Denied (State 13) Postfix + Dovecot + Mysql

    - by Pierre Jeptha
    So we have been scratching our heads for quite some time over this relay issue that has presented itself since we re-built our mail-server after a failed Webmin update. We are running Debian Karmic with postfix 2.6.5 and Dovecot 1.1.11, sourcing from a Mysql database and authenticating with SASL2 and PAM. Here are the symptoms of our problem: 1) When users are on our local network they can send and receive 100% perfectly fine. 2) When users are off our local network and try to send to domains not of this mail server (ie. gmail) they get the "Relay Access Denied" error. However users can send to domains of this mail server when off the local network fine. 3) We host several virtual domains on this mailserver, the primary domain being airnet.ca. The rest of our virtual domains (ex. jeptha.ca) cannot receive email from domains not hosted by this mailserver (ie. gmail and such cannot send to them). They receive bounce backs of "Relay Access Denied (State 13)". This is regardless of whether they are on our local network or not, which is why it is so urgent for us to get this solved. Here is our main.cf from postfix: myhostname = mail.airnet.ca mydomain = airnet.ca smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no smtpd_sasl_type = dovecot queue_directory = /var/spool/postfix smtpd_sasl_path = private/auth smtpd_sender_restrictions = permit_mynetworks permit_sasl_authenticated smtp_sasl_auth_enable = yes smtpd_sasl_auth_enable = yes append_dot_mydomain = no readme_directory = no smtp_tls_security_level = may smtpd_tls_security_level = may smtp_tls_note_starttls_offer = yes smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_loglevel = 1 smtpd_tls_received_header = yes smtpd_tls_auth_only = no alias_maps = proxy:mysql:/etc/postfix/mysql/alias.cf hash:/etc/aliases alias_database = hash:/etc/aliases mydestination = mail.airnet.ca, airnet.ca, localhost.$mydomain mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 recipient_delimiter = + local_recipient_maps = $alias_maps $virtual_mailbox_maps proxy:unix:passwd.byname home_mailbox = /var/virtual/ mail_spool_directory = /var/spool/mail mailbox_transport = maildrop smtpd_helo_required = yes disable_vrfy_command = yes smtpd_etrn_restrictions = reject smtpd_data_restrictions = reject_unauth_pipelining, permit show_user_unknown_table_name = no proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps $virtual_uid_maps $virtual_gid_maps virtual_alias_domains = message_size_limit = 20971520 transport_maps = proxy:mysql:/etc/postfix/mysql/vdomain.cf virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql/vmailbox.cf virtual_alias_maps = proxy:mysql:/etc/postfix/mysql/alias.cf hash:/etc/mailman/aliases virtual_uid_maps = proxy:mysql:/etc/postfix/mysql/vuid.cf virtual_gid_maps = proxy:mysql:/etc/postfix/mysql/vgid.cf virtual_mailbox_base = / virtual_mailbox_limit = 209715200 virtual_mailbox_extended = yes virtual_create_maildirsize = yes virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql/vmlimit.cf virtual_mailbox_limit_override = yes virtual_mailbox_limit_inbox = no virtual_overquote_bounce = yes virtual_minimum_uid = 1 maximal_queue_lifetime = 1d bounce_queue_lifetime = 4h delay_warning_time = 1h append_dot_mydomain = no qmgr_message_active_limit = 500 broken_sasl_auth_clients = yes smtpd_sasl_path = private/auth smtpd_sasl_local_domain = $myhostname smtpd_sasl_security_options = noanonymous smtpd_sasl_authenticated_header = yes smtp_bind_address = 142.46.193.6 relay_domains = $mydestination mynetworks = 127.0.0.0, 142.46.193.0/25 inet_interfaces = all inet_protocols = all And here is the master.cf from postfix: # ========================================================================== # service type private unpriv chroot wakeup maxproc command + args # (yes) (yes) (yes) (never) (100) # ========================================================================== smtp inet n - - - - smtpd #submission inet n - - - - smtpd # -o smtpd_tls_security_level=encrypt # -o smtpd_sasl_auth_enable=yes # -o smtpd_client_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING #smtps inet n - - - - smtpd # -o smtpd_tls_wrappermode=yes # -o smtpd_sasl_auth_enable=yes # -o smtpd_client_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING #628 inet n - - - - qmqpd pickup fifo n - - 60 1 pickup cleanup unix n - - - 0 cleanup qmgr fifo n - n 300 1 qmgr #qmgr fifo n - - 300 1 oqmgr tlsmgr unix - - - 1000? 1 tlsmgr rewrite unix - - - - - trivial-rewrite bounce unix - - - - 0 bounce defer unix - - - - 0 bounce trace unix - - - - 0 bounce verify unix - - - - 1 verify flush unix n - - 1000? 0 flush proxymap unix - - n - - proxymap proxywrite unix - - n - 1 proxymap smtp unix - - - - - smtp # When relaying mail as backup MX, disable fallback_relay to avoid MX loops relay unix - - - - - smtp -o smtp_fallback_relay= # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 showq unix n - - - - showq error unix - - - - - error retry unix - - - - - error discard unix - - - - - discard local unix - n n - - local virtual unix - n n - - virtual lmtp unix - - - - - lmtp anvil unix - - - - 1 anvil scache unix - - - - 1 scache maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient} # # See the Postfix UUCP_README file for configuration details. # uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) # # Other external delivery methods. # ifmail unix - n n - - pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) bsmtp unix - n n - - pipe flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient scalemail-backend unix - n n - 2 pipe flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension} mailman unix - n n - - pipe flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user} spfpolicy unix - n n - - spawn user=nobody argv=/usr/bin/perl /usr/sbin/postfix-policyd-spf-perl smtp-amavis unix - - n - 4 smtp -o smtp_data_done_timeout=1200 -o smtp_send_xforward_command=yes -o disable_dns_lookups=yes #127.0.0.1:10025 inet n - n - - smtpd dovecot unix - n n - - pipe flags=DRhu user=dovecot:21pever1lcha0s argv=/usr/lib/dovecot/deliver -d ${recipient Here is Dovecot.conf protocols = imap imaps pop3 pop3s disable_plaintext_auth = no log_path = /etc/dovecot/logs/err info_log_path = /etc/dovecot/logs/info log_timestamp = "%Y-%m-%d %H:%M:%S ". syslog_facility = mail ssl_listen = 142.46.193.6 ssl_disable = no ssl_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem ssl_key_file = /etc/ssl/private/ssl-cert-snakeoil.key mail_location = mbox:~/mail:INBOX=/var/virtual/%d/mail/%u mail_privileged_group = mail mail_debug = yes protocol imap { login_executable = /usr/lib/dovecot/imap-login mail_executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap mail_executable = /usr/lib/dovecot/gdbhelper /usr/lib/dovecot/imap mail_executable = /usr/lib/dovecot/imap imap_max_line_length = 65536 mail_max_userip_connections = 20 mail_plugin_dir = /usr/lib/dovecot/modules/imap login_greeting_capability = yes } protocol pop3 { login_executable = /usr/lib/dovecot/pop3-login mail_executable = /usr/lib/dovecot/pop3 pop3_enable_last = no pop3_uidl_format = %08Xu%08Xv mail_max_userip_connections = 10 mail_plugin_dir = /usr/lib/dovecot/modules/pop3 } protocol managesieve { sieve=~/.dovecot.sieve sieve_storage=~/sieve } mail_plugin_dir = /usr/lib/dovecot/modules/lda auth_executable = /usr/lib/dovecot/dovecot-auth auth_process_size = 256 auth_cache_ttl = 3600 auth_cache_negative_ttl = 3600 auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@ auth_verbose = yes auth_debug = yes auth_debug_passwords = yes auth_worker_max_count = 60 auth_failure_delay = 2 auth default { mechanisms = plain login passdb sql { args = /etc/dovecot/dovecot-sql.conf } userdb sql { args = /etc/dovecot/dovecot-sql.conf } socket listen { client { path = /var/spool/postfix/private/auth mode = 0660 user = postfix group = postfix } master { path = /var/run/dovecot/auth-master mode = 0600 } } } Please, if you require anything do not hesistate, I will post it ASAP. Any help or suggestions are greatly appreciated! Thanks, Pierre

    Read the article

  • Oracle regains the #1 UNIX Shipments Marketshare

    - by EricReid-Oracle
    Oracle has regained the #1 UNIX Server Shipments spot! According to IDC, Oracle’s share was 33.6%, up from 32.7% in the year ago period, and 32.2% in C4Q13:  IDC: WW Unix Unit Shipments, Share, Growth 2013Q1 Share 2013Q4 Share 2014Q1 Share Sequential Growth Y/Y Growth Oracle 10,141 32.7% 10,294 32.2% 8,355 33.6% -18.8% -17.6% IBM 10,203 32.9% 11,533 36.0% 6,919 27.8% -40.0% -32.2% HP 7,046 22.7% 6,786 21.2% 6,549 26.4% -3.5% -7.1% Fujitsu 1,174 3.8% 1,141 3.6% 1,069 4.3% -6.3% -8.9% Dell 565 1.8% 499 1.6% 519 2.1% 4.0% -8.2% NEC 69 0.2% 81 0.3% 63 0.3% -22.5% -9.4% Others 1,804 5.8% 1,684 5.3% 1,380 5.6% -18.1% -23.5% Total Market 31,002 100.0% 32,018 100.0% 24,854 100.0% -22.4% -19.8% While the UNIX server space is currently undergoing some contraction (on a pure numbers basis), this can be traced in part to an overall consolidation trend, due to the greatly-increased price-performance of our systems. Consider this: one SPARC T5-4 system has 1/16th the number of sockets and 1/192nd the number of cores of the previous high-end M9000-64 system -- all at 5X the price-performance. SPARC. Solaris. Nuff' said.

    Read the article

  • I/O Reads and Writes per process Unix/SunOS?

    - by Alex
    Can prstat or something similar tell me how many reads/writes a process is doing similar to how Task Manager on Windows can show I/O Reads, I/O Writes and many other I/O columns per process? I'm using SunOS 5.10, but feel free to post other Unix flavours too.

    Read the article

  • How to jump to a particular flag in a Unix manpage?

    - by dotancohen
    When reading a Unix manpage in the terminal, how can I jump easily to the description of a particular flag? For instance, I need to know the meaning of the -o flag for mount. I run man mount and want to jump to the place where -o is described. Currently, I search /-o however that option is mentioned in several places before the section that actually describes it, so I must jump around quite a bit. Thanks.

    Read the article

  • Is there a Unix/Linux platform equivalent to Telligent Community?

    - by Scott A. Lawrence
    Telligent Community combines blogs, wikis, forums, and file-sharing capabilities into a single product with single sign-on, using all Microsoft technologies. Is there an equivalent offering that runs on Unix/Linux? Or would I have to pick and choose individual product offerings and figure out another option for single sign-on across them? Are there plug-ins for something like WordPress or MovableType that might add the necessary functionality? A friend of mine is looking to add a "members-only" area to her company's website, and since they're hosted on Dreamhost (and can't afford StackExchange pricing yet), I'm trying to find other options for them.

    Read the article

  • Is there a Unix/Linux platform equivalent of Telligent Community (formerly Community Server)?

    - by Scott A. Lawrence
    Telligent Community combines blogs, wikis, forums, and file-sharing capabilities into a single product with single sign-on, using all Microsoft technologies. Is there an equivalent offering that runs on Unix/Linux? Or would I have to pick and choose individual product offerings and figure out another option for single sign-on across them? Are there plug-ins for something like WordPress or MovableType that might add the necessary functionality? A friend of mine is looking to add a "members-only" area to her company's website, and since they're hosted on Dreamhost (and can't afford StackExchange pricing yet), I'm trying to find other options for them.

    Read the article

  • Monitor the shell activity of a user on your Unix system?

    - by Joseph Turian
    Trust, but verify. Let's say I want to hire someone a sysadmin, and give them root access to my Unix system. I want to disable X windows for them, only allow shell usage (through SSH, maybe), so that all operations they perform will be through the shell (not mouse operations). I need a tool that will log to a remote server all commands they issue, as they issue them. So even if they install a back door and cover their tracks, that will be logged remotely. How do I disable everything but shell access? Is there a tool for instantaneously remotely logging commands as they are issued?

    Read the article

  • What is the official installer for Unix packages on Mac OS?

    - by dehmann
    I'm a bit confused about the installation of standard Unix packages on Mac OS X. For example, I have /usr/bin/svn, which is SVN v.1.4.4, but FinkCommander says svn is not installed. The same holds for other packages, like emacs etc. Is that just a wrong FinkCommander setting? Currently it is set to install everything in /sw, which is not even in the PATH. So, do I just have to set it to install packages to /usr, and it will recognize the installed software? I don't want to install duplicate packages of everything, and it is quite weird that the FinkCommander seems not to be in sync with the installed software. Or is there any other installer I should be using? Is Mac Ports the recommended installer to use? (I'm using Mac OS 10.5.8.)

    Read the article

  • Why does cat not use options the way I expect UNIX programs to use switches?

    - by Chas. Owens
    I have been a UNIX user for more years than I care to think about, and in that time I have been trained to expect that when contradictory switches are given to a program the last one wins. Recently I have noticed that cat -bn file and cat -nb file both use the -b option (number blank lines) over the -n option (number all lines). I get this behavior on both BSD and Linux, so I don't think it is an implementation quirk. Is this something that is specified somewhere and am I just crazy for expecting the first example to number all lines?

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >