Search Results

Search found 6758 results on 271 pages for 'shell exec'.

Page 57/271 | < Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >

  • Mac server default file permissions

    - by Bobby Jack
    How do I change the default file permissions for files created on a Mac server? In case it's relevant, this is a Mac Mini running Mac OS 10.6.7. It's currently used mainly as a file server, and there are several users who need to share files. These files need to be writable by all, rather than the default which is writable only by the owner. I've been trying to do something with umask and a startup script, but I'm not sure there's a startup script that will apply to connections via Finder. I also need this to apply to files created on a client (also Macs) and copied onto the server.

    Read the article

  • How to execute .sh file on Windows?

    - by sushant
    When I am trying to execute a file(name.sh) in the command line by the command ./name.sh , I am getting the error that: "." is not recognized as an internal or external command, operable or batch file please help me execute the .sh file

    Read the article

  • How to abort robocopy on first error

    - by Yurik
    When using robocopy windows utility, what flags do I set so that robocopy aborts on the very first error it sees, similar to xcopy /dry command? I need to mirror two dirs, and on occasion some files would be locked. I do not want robocopy to continue trying to copy files, or override the files that are not locked - rather the very first error should stop the whole copy process. UPDATE: I already have the /R set to 0 - unfortunately that it only applies to a single file, NOT to the whole copying process. Hence, the first file is ignored (instead of stopping the copying), but subsequent files are copied.

    Read the article

  • user crontabs don't work, only /etc/crontab

    - by gletscher
    Hi when I use the command crontab -e to set up cron, the commands get triggered (according to syslog) but nothing happens. Also if I run sudo crontab -e. The only way to actually get cron working is to manually etc /etc/crontab I'm confused, since syslog gives me the same output for both methods. Any ideas for tracing down this bug? Thanks alot!

    Read the article

  • How come the ls command prints in multiple columns on tty but only one column everywhere else?

    - by David Lou
    Even after using Unix-like OSes for a couple years, this behaviour still baffles me. When I use the ls command in a directory that has lots of files, the output is usually nicely formatted into multiple columns. Here's an example: $ ls a.txt C.txt f.txt H.txt k.txt M.txt p.txt R.txt u.txt W.txt z.txt A.txt d.txt F.txt i.txt K.txt n.txt P.txt s.txt U.txt x.txt Z.txt b.txt D.txt g.txt I.txt l.txt N.txt q.txt S.txt v.txt X.txt B.txt e.txt G.txt j.txt L.txt o.txt Q.txt t.txt V.txt y.txt c.txt E.txt h.txt J.txt m.txt O.txt r.txt T.txt w.txt Y.txt However, if I try to redirect the output to a file, or pipe it to another command, only a single column appears in the output. Using the same example directory as above, here's what I get when I pipe ls to wc: $ ls | wc 52 52 312 In other words, wc thinks there are 52 lines, even though the output to the terminal has only 5. I haven't observed this behaviour in any other command. Would you like to explain this to me?

    Read the article

  • Can I shorten my directory commands in ubuntu?

    - by Spencer Cooley
    When working on a rails app I like to open all of my files through the command line like so cd my_app gedit app/views/user/show.html.erb Is there a way that I could shorten this so that I could just write something like gedit user_views/show.html.erb ? I would like the console to stay in the main directory, I just don't like having to type out app/controller/user_controler.rb every time I want to open the user controller. I know that I could just open the file with my mouse, but I feel like moving from keyboard to mouse breaks my focus a little bit. When I can just tap away at the keyboard it seems like I have a more smooth workflow.

    Read the article

  • Sudoers file permissions

    - by twigg
    I'm trying to run the following command without the need for sudo: echo 1 | sudo tee -a /sys/block/$hd/device/delete The $hd variable changes dynamically from sdb - sdi for each one of my HDD's in my drive bay. I added the following line to the sudoers file: operator ALL=/sys/block/sdb/device/delete But this didn't make a difference its still asking for sudo password even if I run: echo 1 | sudo tee -a /sys/block/sdb/device/delete

    Read the article

  • Newbie: get access privilege

    - by Mellon
    I am newbie on Linux Ubuntu machine. I logged in to the Ubuntu with username: student. There are some directories only allowed root user to access, for example /var/lib/mysql ,(I know I can use sudo to access but it is not what I want). If I want to get the access privilege on those directories with student account, is it so that I can run the following command : chown student: PATH_TO_ROOT_USER_PRIVILEGED_DIR and after that, I can access that directory by using my own account ? am I right? If I am right, then will root user lose the access privilege because I changed it to student user? If I am wrong, please tell me the right solution. P.S. please don't concern on what I am going to do on /var/lib/mysql directory, that is only my example, as I mentioned above, I mean generally *for those directories which only have root privilege*, can I use chown to change access privilege and will root user then loose the access because of the change made by chown ? I just wanna know the effect of chown.

    Read the article

  • Writing a script for ash?

    - by rumtscho
    My VPN is behaving funny sometimes, and I have to restart it often. I wanted to write a script which does that for me. It doesn't have to be anything fancy, just a shortcut for the commands I have to type into the terminal. More specifically: it will look at the running processes. If it finds a running vpnc process, it will kill it. Then it will start vpnc. I've written bash scripts of similar complexity, but now I don't have a bash, only an ash. Until now, the only difference I noticed is that there are much less commands available, but then, I don't use it very often. So I have some questions. Is writing ash scripts different than writing bash scripts? Is there something specific to consider when doing it? When the script is ready, how can I deploy it? For bash, I just put the executable file under /usr/lib and run it by typing the file name into the command line, will this work with ash? Are there any special pitfalls to watch out for in the script I want to write? I think that the killing process part may get hairy, if I write something that kills the wrong process, but even then running the script shouldn't break anything permanently, right?

    Read the article

  • Bash script 'while read' loop causes 'broken pipe' error when run with GNU Parallel

    - by Joe White
    According to the GNU Parallel mailing list this is not a GNU Parallel-specific problem. They suggested that I post my problem here. The error I'm getting is a "broken pipe" error, but I feel I should first explain the context of my problem and what causes this error. It happens when trying to use any bash script containing a 'while read' loop in GNU Parallel. I have a basic bash script like this: #!/bin/bash # linkcheck.sh while read domain do host "$domain" done Assume that I want to pipe in a large list (250mb say). cat urllist | ./linkcheck.sh Running host command on 250mb worth of URLs is rather slow. To speed things up I want to break up the input into chunks before piping it and then run multiple jobs in parallel. GNU Parallel is capable of doing this. cat urllist | parallel --pipe -j0 parallel ./linkcheck.sh {} {} is substituted by the contents of urllist line-by-line. Assume that my systems default setup is capable of running 500ish jobs per instance of parallel. To get round this limitation we can parallelize Parallel itself: cat urllist | parallel -j10 --pipe parallel -j0 ./linkcheck.sh {} This will run 5000'ish jobs. It will also, sadly, cause the error "broken pipe" (bash FAQ). Yet the script starts to work if I remove the while read loop and take input directly from whatever is fed into {} e.g., #!/bin/bash # linkchecker.sh domain="$1" host "$1" Why will it not work with a while read loop? Is it safe to just turn off the SIGPIPE signal to stop the "broken pipe" message, or will that have side effects such as data corruption? Thanks for reading.

    Read the article

  • Removing duplicate files, keeping only the newest file

    - by pinkie_d_pie_0228
    I'm trying to clean up a photo dump folder, in which several files are duplicated but with different filenames or lost in subfolders. I've looked at tools like rmlint, duff and fdupes, but I can't seem to find a way to have them keep only the file with the most recent timestamp. I suspect I have to postprocess the results, but I don't even know where to start to do this. Can anyone guide me on how to get the duplicate files list and delete everything but the newest file?

    Read the article

  • List files with last access date in linux

    - by kayaker243
    I'd like to clean up a server that my webmaster let turn into a mess. I know how to list all files not accessed within the last x days using find and -atime, but what I'm looking for is to come up with a listing of the last access date for files one level down in directory /foo: /foo/bar1.txt Dec 11, 2001 /foo/bar2.txt Nov 12, 2008 /foo/bar3.txt Jan 12, 2004 For folders one level down in directory /foo, list the date of the most recently accessed file within the directory (no limit on depth for identifying last access date) /foo/bar1/ Feb 13, 2012 /foo/bar2/ Oct 11, 2008 Where /foo/bar1/ has a file modified Jan 1, 1998 and Feb 13, 2012 and /foo/bar2/ has 30 files, most recent of which was accessed Oct 11, 2008. This question is similar to: http://stackoverflow.com/questions/5566310/how-to-recursively-find-and-list-the-latest-modified-files-in-a-directory-with-s but rather than the modification date, the date of interest is the last accessed date.

    Read the article

  • How to interpret output from Linux 'top' command?

    - by Ali
    Following a discussion made HERE about how PHP-FPM consuming memory, I just found a problem in reading the memory in top command. Here is a screenshot of my top just after restarting PHP-FPM. Everything is normal: about 20 PHP-FPM processes, each consuming 5.5MB memory (0.3% of total). Here is the aged server right before restart of PHP-FPM (one day after the previous restart). Here, we still have about 25 PHP-FPM with double memory usage (10MB indicating 0.5% of total). Thus, the total memory used should be 600-700 MB. Then, why 1.6GB memory has been used?

    Read the article

  • Distributing a custom command line tool to enterprise servers

    - by Jeremy Baker
    I've been tasked with building a command line tool that we will be providing to our enterprise customers so that they can use the API to upload data to our platform. The API works with standard cURL requests, so I can do most of the basic functionality with simple bash scripting, although I would like to provide something that is solid and really makes it easy for them to use and I don't know what I don't know. It's been a good 8 years since I've really done any serious sysadmin work. Most of the good tools I use these days are written in Ruby or Python and have a standard distribution process (Gems, for example). However, I know rhel and other platforms have their own package managers. Finally, the question: In today's day and age, what language / distribution method should I consider in order to cover the widest range of platforms without having to build completely different versions for each platform? I'd also love any general feedback you have about building similar projects, or links to projects that you think do a good job of this now and have open source code that I could read. Thanks in advance!

    Read the article

  • Command to execute another command while replaying the command on STDOUT

    - by hakre
    It's not easy to formulate the question properly, maybe it helps when I describe what I'd like to do. I want to execute a command and pipe it's output into a tool called pastebinit which uploads the STDOUT output to pastebin. That works very well, however I would like to send the command itself on top of it but w/o typing it a second time. Is there some command I can launch "my command" with that will Print "my command" on STDOUT Executes "my command" I have the feeling that something like that exists but as hard as it is to formulate such a question properly, I was not able to dig it up with google so far.

    Read the article

  • Wildcards not being substituted

    - by user21463
    #!/bin/bash loc=`echo ~/.gvfs/*/DCIM/100_FUJI` rm -f /mnt/fujifilmA100 ln -s "$loc" /mnt/fujifilmA100 For some reason the variable * doesn't get substituted with the only possible value and gets given the value /home/chris/.gvfs/*/DCIM/100_FUJI. Does anyone have an idea of why? Please note: If global expansion fails, the pattern is not substituted. I ran the commands: chris@comp2008:~$ loc=`echo ~/.gvfs/*/DCIM/100_FUJI ` chris@comp2008:~$ echo $loc /home/chris/.gvfs/gphoto2 mount on usb%3A001,008/DCIM/100_FUJI So we can see the expansion should work I have now switched to using: loc = `find ~/.gvfs -name 100_FUJI ` I am just curious why it doesn't work as is. Debugging output using sh -x echo /home/chris/.gvfs/*/DCIM/100_FUJI loc=/home/chris/.gvfs/*/DCIM/100_FUJI rm -f /mnt/fujifilmA100 ln -s /home/chris/.gvfs/*/DCIM/100_FUJI/mnt/fujifilmA100

    Read the article

  • bash vs sh | What is the difference

    - by Saif Bechan
    In using i see 2 types of code #!/usr/bin/sh and #!/user/bin/bash I have Googled this and the opinions vary a lot. The explanation I have seen on most websites is that sh is older than bash, and that there is no real difference. Does someone know the difference between these and can give a practical example when to use either one of them. I highly doubt that there is no real difference, because then having to things that do the exact same thing would be just

    Read the article

  • Why does terminal prompt text becomes black when connecting to Ubuntu with Nomachine NX client?

    - by David B
    I'm using Nomachine NX client for Windows to remotely connect to my Ubuntu. Every now and then I experience a strange phenomena: the text in the prompt of all open terminal windows becomes black, so it can't be viewed over the black background. Typed commands are also black, but the results are in normal colors. So I can run stuff, but can't see what I'm typing... After I close all open terminal windows and start a new terminal window, everything goes back to normal. This is rerally annoying and happens quite often. Any idea why?

    Read the article

  • Need script to redirect STDIN & STDOUT to named pipes

    - by user54903
    I have an app that launches an authentication helper (my script) and uses STDIN/STDOUT to communicate. I want to re-direct STDIN and STDOUT from this script to two named pipes for interaction with another program. E.g.: SCRIPT_STDIN pipe1 SCRIPT_STDOUT < pipe2 Here is the flow I'm trying to accomplish: [Application] - Launches helper script, writes to helpers STDIN, reads from helpers STDOUT (example: STDIN:username,password; STDOUT:LOGIN_OK) [Helper Script] - Reads STDIN (data from app), forwards to PIPE1; reads from PIPE2, writes that back to the app on STDOUT [Other Process] - Reads from PIPE1 input, processes and returns results to PIPE2 The cat command can almost do what I want. If there were an option to copy STDIN to STDERR I could make cat do this with a command (assuming the fictitious option -e echos to STDERR rather than STDOUT): cat -e PIPE2 2PIPE1 (read from PIPE2 and write it to STDOUT, copy input, normally going to STDERR to PIPE1)

    Read the article

  • pfSense command to delete stale SAD

    - by Justin Shin
    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 problem once I let it go for a few days. I just installed the cron package for pfSense so I could run a script to identify stale SAD's and delete them but I am not that familiar with BSD or pfSense. Is there a command that enumerates SAD's and their properties, and another that can delete by ID? I can form the conditional parts of the script but I do not know the commands to run. I would imagine it would be something like: Enumerate SAD's Identify Duplicate ones by matching Source and destination IP's Find the one with the larger bytes transferred Delete

    Read the article

  • Transfer used ram to swap and free more physical ram

    - by AbuOmar
    I have a vps with 256m physical ram and 512m swap space, I am trying to use a software that need more than 256m and less than 512m ram, so it uses swap. The problem is at some moment of the installation, the installation process checks the available physical ram, it's full (some swap is used), so it pauses the installation and tills that it must be some more ram to continue the installation.. I see that I need to move some of used physical ram to swap while the process is running.. Is there anyway I can do that? or any other solution! For sorry I am using openvz vps, and the vm.swappiness option can't be modified as a solution.

    Read the article

  • home, end, delete, pageup, pagedown with ksh

    - by Nicolas
    Hello. I want to use home, end, delete, pageup, pagedown with ksh. My TERM is xterm-color. These keys works fine with tcsh and zsh, but not with ksh (print a tilda ~) I found this: bind '^[[3'=prefix-2 bind '^[[3~'=delete-char-forward bind '^[[1'=prefix-2 bind '^[[1~'=beginning-of-line bind '^[[4'=prefix-2 bind '^[[4~'=end-of-line But when I set one bindkey, the last does not work anymore. How can I use these keys in ksh with a .kshrc ? Thanks.

    Read the article

  • What are the common Control combinations in a terminal setting

    - by Hamish Downer
    I would like to have a good guide to the common Control key combinations in use in bash (and similar) shells and the combinations used by common programs in use in those shells. My particular motivation is to be able to run GNU screen on one computer, ssh to a second computer and use screen and irssi on that computer. So I need to use something other than Ctrl-A to control one of the screen sessions. So I need to know what are Control key combinations are safe to use. But I imagine this list would be useful for others who want to bind custom actions to Control key combinations. I reckon we'd be best to group the Control key combinations by application (eg. bash itself, screen, vim, emacs), to make it easy to spot the applications you use or can ignore. So please one application per answer - hope that works.

    Read the article

< Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >