FTP Command Not in /usr/bin

My hard drive seems to have partially died, I can't seem to boot it up in to Target mode, but I can boot in to recover mode and then open up a terminal and navigate around the drive.  I'm trying to FTP to my NAS so I can back up as much of my HD as possible, but I can't find the ftp command.  I thought it was in /usr/bin but I only see sftp there and I can't sftp to my NAS (it's a WD MyBookLive).
I can ping my NAS, so I know it is there, I just don't know how to connect to it from terminal in recovery mode.  Any other suggestion on how to connect to my NAS?

Hi,
1.     Type ftp to get into FTP mode - if this does not work, try accessing root by typing sudo -i and entering password for the machine. Then type ftp again. This should give you the command line ftp>
2.     Type open <ip address>.
3.     At this point you should be provided with a box where you type in your username and password for the NAS.
4.     Type lcd<folder> or lcd <folder>.
5.     Type ls and cd commands to place yourself into the desired folder on the NAS.
6.     Type the ascii or bin command to set your file transfer to ASCII or Binary respectively.
7.     Type one of the following commands to send or receive the desired files: get, mget, put and mput.
8.     When finsihed, type the quit command to close the connection and exit to exit the FTP session.

Similar Messages

  • What does this error message mean and how do I solve it? "Sorry, one or more of the following command-line tools was not found:  /usr/bin/lsbom, /bin/pax, /bin/mkdir, /bin/chmod, or /usr/bin/update_prebinding."

    When I try to open up this program, Pacifist, I receive this error message. Here's a screenshot. http://i.imgur.com/v717w.jpg What does this error message mean and how do I solve it?

    It sounds like some of the Unix Executable commands were removed (or the permissions to those were modified) out of the /usr/bin/ folder.  You can try opening disk utility and repairing permissions on Macintosh HD or you can reboot your computer and holding down option-r when it comes back up to reinstall Lion again.  This will not delete your personal information or applications you have installed but it would be best to back it up to Time Machine before you do.  The article on how to do this is here. (http://www.apple.com/macosx/recovery/)  I have had to do this before and it works like a charm.  It should fix your issue but grab a cup of coffee because its going to take about 35 - 40 minutes depending on how fast your computer is.

  • Command Line Tools installs the latest version of clang (and others) in /Library/Developer/CommandLineTools/... but not in /usr/bin/

    I've upgraded Xcode to the latest 5.1 Installed Command Line Tools via xcode-select --install Homebrew tells me "A newer Command Line Tools release is available"
    brew --config:
    Xcode: 5.1 CLT: 5.1.0.0.1.1393561416 LLVM-GCC: build 2336 Clang: 3.1 build 318
    Checking my clang executable:
    $ /usr/bin/clang --version Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
    $ /Library/Developer/CommandLineTools/usr/bin/clang --version Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
    So it appears Command Line Tools didn't install clang (and perhaps other executables) into /usr/bin? I checked my other laptop (w/ Mavericks), and /usr/bin/clang is version 5.1.
    So I'm guessing this is the problem? I've tried to reinstall Command Line Tools as sudo, but now it won't let me install again (says software isn't currently available).
    Can anyone help me with this? I've spent hours on it now, but can't find a solution.
    Thanks

    BTW, I installed Xcode 5.1 from the Store, but have never run xcode-select --install.  Here is the verbose output from a clang.
    xew ~/$:clang -v -o hello main.c
    Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
    Target: x86_64-apple-darwin13.1.0
    Thread model: posix
    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.9.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name main.c -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 236.3 -v -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ usr/bin/../lib/clang/5.1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/ SDKs/MacOSX10.9.sdk -fdebug-compilation-dir /Users/xew -ferror-limit 19 -fmessage-length 100 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.9.0 -fencode-extended-block-signature -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o /var/folders/zf/d5vqmmtn5mq7h6766jtlkrvr0000gn/T/main-353995.o -x c main.c
    clang -cc1 version 5.1 based upon LLVM 3.4svn default target x86_64-apple-darwin13.1.0
    ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer /SDKs/MacOSX10.9.sdk/usr/local/include"
    ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer /SDKs/MacOSX10.9.sdk/Library/Frameworks"
    #include "..." search starts here:
    #include <...> search starts here:
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ usr/bin/../lib/clang/5.1/include
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ usr/include
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/ SDKs/MacOSX10.9.sdk/usr/include
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/ SDKs/MacOSX10.9.sdk/System/Library/Frameworks (framework directory)
    End of search list.
    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.9.0 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/ SDKs/MacOSX10.9.sdk -o hello /var/folders/zf/d5vqmmtn5mq7h6766jtlkrvr0000gn/T/main-353995.o -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ usr/bin/../lib/clang/5.1/lib/darwin/libclang_rt.osx.a
    xew ~/$:

  • Where are the settings for the "open" command, located at /usr/bin/open?

    I have Windows XP installed on a partition on my Macbook and I use Parallels to access some of the Windows applications.
    When I am in Mac OS X, and I don't even have a virtual machine running, if I enter the following command in the terminal, I get some really strange behavior:
    /usr/bin/open -a firefox http://localhost/~myname/somewebpage.html
    The open command will launch firefox within Mac OS X and display the page, but, it WILL ALSO TRY TO LAUNCH FIREFOX VIA PARALLELS. So, it starts a Parallels session and tries to launch Firefox. I see the Firefox icon in my dock twice, once normally, and once with the Parallels version of the Firefox icon. But, I cannot view the Parallels instance of Firefox.
    In order to debug this, I removed Firefox from Mac OS X (deleted Firefox.app from my applications folder) and I un-installed it from the windows partition using Add/Remove programs in windows.
    Now, running the open command as stated above launches Safari in Mac OS X and it still launches parrallels.
    Where is the list of application associations that the "open" command uses? I assume there is some incorrect associate that is causing this but, I have no idea how to find it.
    Thanks in advance for any advice you can give.

    Thank you for your reply.
    I actually checked out the man page for "open" but, I was unable to find LaunchServices in the finder. I was hoping there would be some sort of manifest, or application map, within LaunchServices that might be the source of my problem.
    Regarding using the full path: Good suggestion. That will clear it up when I use the command line, or if I were writing my own app, etc...unfortunately, I became aware of this problem because Netbeans is using the command in the abbreviated form I posted above (to launch web applications I am debugging), and I can't edit it.
    I removed Firefox from both Windows and Mac OS X on my machine, and tested the Netbeans functionality, it launched my application in Safari with no errors. I reinstalled Firefox on my Mac OS X partition and selected it in Netbeans preferences as the browser to use when debugging an app. When I tried to debug an application in Netbeans again, I got the same behavior...parallels launched. Ugh.
    There was a folder, on the Windows side of things, called something like Parallels\Shared Applications. It had a shortcut to Firefox in it but, I removed that before doing my testing. I was hoping there would be something similar on the Mac OS X side but, I haven't been able to find anything.
    Thank you both for your help. I think I might need to visit the Parallels forums for this one.

  • Volume up shortcut not working `/usr/bin/amixer set Master playback`

    I used to use something like
    /usr/bin/amixer set Master playback 2+
    to increase/decrease volume but it seems to have stopped working after update and changing to GNOME3 from XFCE 4.10. Same in terminal, has the syntax changed?

    In the console:
    [jiewmeng@JM Nodebook]$ /usr/bin/amixer set Master playback 2-
    Simple mixer control 'Master',0
    Capabilities: pvolume pswitch pswitch-joined penum
    Playback channels: Front Left - Front Right
    Limits: Playback 0 - 65536
    Mono:
    Front Left: Playback 21533 [33%] [on]
    Front Right: Playback 21533 [33%] [on]
    [jiewmeng@JM Nodebook]$ /usr/bin/amixer set Master playback 2-
    Simple mixer control 'Master',0
    Capabilities: pvolume pswitch pswitch-joined penum
    Playback channels: Front Left - Front Right
    Limits: Playback 0 - 65536
    Mono:
    Front Left: Playback 21531 [33%] [on]
    Front Right: Playback 21531 [33%] [on]
    notice theres no change ... 33%. Oh then I did Ctrl+Alt+F2 to go into console. Then did the same with same results. Then did with sudo and it worked. It worked b4 without sudo? Maybe I messed up something? Btw, this happened after I did `sudo pacman -Syyu gnome`. Maybe it changed some config? Or maybe its the upgrades?

  • Ftp commands not recognizing local file locations

    Hi folks. I'm trying to design an application (middleware) which takes advantage of the shell to send via ftp, a file to a remote server.
    The login works, but it won't recognize a local path:
    ftp -v -u "ftp://username:[email protected]/subdir1/" ///library/webserver/documents/domain1/alpha.txt
    I have to have focus in the directory where the file is located in order for this to work:
    cd /library/webserver/documents/domain1/
    ftp -v -u "ftp://username:[email protected]/subdir1/" alpha.txt
    But that adds another step to the process, and it doesn't do me any good.
    Is there something I'm missing, or do I have to use that to provide focus in that command? I thought the command would have taken care of it.
    Cheers

    Yeah I have had that same problem. Now, I can't even connect to any ftp sever outside of the network (or maybe even not at all). I need help. No matter what I try, it won't work on my computer. I've used System Preferences, Safari, Finder, and even Terminal. The problem appears to be only on my computer, but similar problems like login problems have appeared every once in a while on computers in the same network as me.

  • /usr/bin/ld215 not availbel in RHEL 5.4 - For 11.5.10.2 Installation

    Hi Friends,
    I am installaing 11.5.10.2 on RHEL 5.4
    The Metalink Note says : (Oracle Applications Installation Update Notes, Release 11i (11.5.10.2) [ID 316806.1] )
    For Oracle Linux 5 and Red Hat Enterprise Linux 5 only :
    *# ln -s /usr/bin/ld215 /usr/bin/ld*
    But i don't have the file /usr/bin/ld215 .
    Even this note (Oracle Applications 11i Installation on OEL5 or RHEL5 [ID 730444.1]) says to perform
    mv /usr/bin/ld /usr/bin/ld.old
    ln -s /usr/bin/ld215 /usr/bin/ld
    But i have /usr/bin/ld and doesn't have /usr/bin/ld215 ( In reverse)
    If i perform the :
    mv /usr/bin/ld /usr/bin/ld.old
    ln -s /usr/bin/ld215 /usr/bin/ld
    i get error (/usr/bin/ld not found) in system check so i left /usr/bin/ld as it is
    Is the command *# ln -s /usr/bin/ld215 /usr/bin/ld* wrong (should it be otherway) ? How do i get this file ? can i skip this? I don't find any error on system check in rapidwiz but will it cause any issue in future/
    Please suggest
    Regards,
    DB

    Hi Hussein,
    It got fixed after installating the rpm compat-binutils215-2.15.92.0.2-24.i386.rpm ( as a pre req of compat-oracle-el5-1.0-5)
    Regards,
    DB

  • [SOLVED] sudo and "command not found" problems

    Ok, the problem I've got is this: sudo has suddenly started acting real strange. It can't find any programs. For example, if i type
    sudo echo
    It just goes
    sudo: echo: command not found
    And another problem I've got, is that as a regular user, it can't find programs in /sbin, or other "exotic" places. For example it can't find firefox, because it's not in /usr/bin or /bin, but in /opt/mozilla/bin.
    Please, help me!
    Last edited by mrpedroxx (2008-06-14 13:23:49)

    sudo -V outputs this
    Sudo version 1.6.9p15
    $PATH outputs
    bash: /usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:.: No such file or directory
    pacman -Q firefox outputs
    firefox 2.0.0.7-1
    Yeah, maybe I should update it anyway
    And /var/log/errors.log does contain stuff about hard disks, but it's just me mounting my iPod and the Windows partition on my hd

  • /usr/bin/ directory scripts

    I have OSX 10.9.5.  I discovered the "fuser" command in the /usr/bin/ directory is a script, instead of a binary.  Anyone have any idea why Apple would replace the "fuser" binary with a script?

    I guess because lsof does the important work, and scripting lsof did the job that was needed for fuser.  1 less executable to maintain, where that executable needs to know the inner workings of the operating system.
    It has been a perl script since at least Leopard (10.5 is the oldest system available to me).  I do not know when it first appeared, and if it was always a perl script.
    When was the last time you knew it was an executable, as you say it was replaced?
    POSX only requires that there be an fuser command, it does not dictate how that command is implemented.

  • Command not found(127) error for all commands

    I'm basically having the same problem as the poster in this thread: http://discussions.apple.com/thread.jspa?threadID=1376825
    Every time I try to run a program like Onyx, it gives me various errors basically indicating that it can't access any of the built-in unix commands like date or ls.
    For example, one error I got was
    "AppleScript Error
    sh: line 1: date: command not found(127)"
    Obviously, its not able to access any of the commands in the /usr/bin folder. However, when I execute date directly from the terminal, it works. My path is echoed as "/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/ActivePerl-5.10 /bin:/usr/local/ActivePerl-5.10/site/bin:/usr/local/soylatte16-1.0.3/bin:/usr/lo cal/php5/bin//Library/Frameworks/Python.framework/Versions/2.6/bin:/bin:/sbin:/u sr/bin:/usr/sbin"
    The second last entry is /usr/bin.
    I even made the folder executable, but it didn't help. There's something seriously wrong with my Mac. A couple of days ago, I filled up the Startup Disk by mistake by torrenting too much. Could that be the source of the problem? Now, spotlight doesn't seem to have an index for the drive, programs are giving errors, and Onyx says the Volume Structure of the drive needs to be repaired.
    I have been experimenting with developing, and did mess around with my path setting earlier, but have never faced this problem.

    Yes, in an ideal situation, a lot of my hard drive should have been free, but over the years, files build up. And I cannot actually foresee me wasting 15% of my hard disk by keeping it empty. The point of buying more space is that I should be able to use it.
    Anyhow, I think 9.5 gb should be fine for basic functioning of the OS right? I don't see why 'date' should require 9.5 gb of free space to carry out its admittedly immense task of returning the current date! And the worst part is, its running correctly from the terminal, so I can't for the life of me figure out why applications can't access it correctly.

  • [SOLVED] node package manager: command not found

    I installed nodejs, and it was working fine. I updated a couple of days ago, and now npm install and npm lead to
    zsh: command not found
    Node has some naming conflicts, from what I have read. I am confused as to how the namespace for packages works, but hopefully someone can point me in the right direction with this because, while confusing, I don't think it is causing the problem. I usually execute the application as node, but it is in the repositories as nodejs. I found node in /usr/bin. I can execute npm there, but it advises that npm should be run in a normal shell with a different directory, not in /usr/bin. There was no nodejs or npm.
    I removed nodejs using
    pacman -Rdd nodejs
    since adom has dependencies, but when I tried to reinstall using
    pacman -S nodejs
    , it said it was up to date and reinstalled. I updated my system and rebooted. I still can execute node but not the npm-it still returns
    zsh: command not found: npm
    I have no idea why the node package manager disappearred. I also have no idea why it would not have reinstalled with nodejs from the repo.
    ➜ ~ sudo pacman -Rdd node
    [sudo] password for user:
    error: target not found: node
    ➜ ~ nodejs npm
    zsh: command not found: nodejs
    ➜ ~ node npm
    module.js:338
    throw err;
    ^
    Error: Cannot find module '/home/user/npm'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3
    Last edited by 01010101 (2015-06-17 17:40:33)

    ➜ ~ pkgfile npm
    zsh: command not found: pkgfile
    ➜ ~ sudo pacman -S pkgfile
    resolving dependencies...
    looking for inter-conflicts...
    Packages (1): pkgfile-15-1
    Total Download Size: 0.02 MiB
    Total Installed Size: 0.05 MiB
    :: Proceed with installation? [Y/n] y
    :: Retrieving packages ...
    pkgfile-15-1-x86_64 21.6 KiB 323K/s 00:00 [######################] 100%
    (1/1) checking keys in keyring [######################] 100%
    (1/1) checking package integrity [######################] 100%
    (1/1) loading package files [######################] 100%
    (1/1) checking for file conflicts [######################] 100%
    (1/1) checking available disk space [######################] 100%
    (1/1) installing pkgfile [######################] 100%
    ==> Run 'pkgfile --update' to initialize the database
    ➜ ~ pkgfile npm
    error: No repo files found. Please run `pkgfile --update'.
    ➜ ~ pkgfile --update
    error: unable to write to /var/cache/pkgfile: Permission denied
    ➜ ~ sudo pkgfile --update
    :: Updating 4 repos...
    download complete: multilib [ 224.2 KiB 372K/s 3 remaining]
    download complete: core [ 608.8 KiB 536K/s 2 remaining]
    download complete: extra [ 6.9 MiB 2038K/s 1 remaining]
    download complete: community [ 10.9 MiB 2.55M/s 0 remaining]
    :: download complete in 4.26s < 18.6 MiB 4.37M/s 4 files >
    :: waiting for 1 process to finish repacking repos...
    ➜ ~ pkgfile npm
    community/npm
    ➜ ~ cd development/anj
    ➜ anj ls
    app.js bin bower.json package.json public routes views
    ➜ anj npm install
    zsh: command not found: npm

  • Create script in /usr/bin called pacclean?

    #!/bin/bash
    su -c 'pacman -Qdt'
    su -c 'pacman -Scc && pacman-optimize'
    yaourt -Syua
    this script was created to show
    1) To list all packages no longer required as dependencies (orphans) (pacman -Qdt)
    2) Clean the package cache of packages that are not currently installed (/var/cache/pacman/pkg) and removes all packages from the cache. (pacman -Scc)
    3) Improving database access speeds reduces the time taken in database-related tasks, e.g. searching packages and resolving package dependencies. (pacman-optimize)
    4) You can update your system including AUR packages (yaourt -Syua)
    I think this is a good script i think, but is there a way to streamline it by not entering my password over 3 times? this script i created in /usr/bin and called it pacclean which i made it executable.

    I have a script that has much the same concept as this one, but much longer. I'm sure I posted it in this forum before, but as it's changed a little recently, I'll repost here. It may give someone some ideas for how they'd like to wrap pacman themselves, or some coding style thoughts. I install this in /usr/local/sbin/pu and add that same path to sudoers with NOPASSWD set. Note that you don't have to run it with sudo yourself, as it will detect if you are not root and re-run itself in sudo for you if not. Note that this will produce a large amount of noise output on the first run, as the saved state data (/var/lib/pu) won't be populated yet, and so all the comparisons from last run to now will run as if everything in the world is brand new.
    #!/bin/bash
    # vim:set filetype=sh: *
    if [[ "$(/usr/bin/id -u)" != "0" ]] ; then
    exec /usr/bin/sudo $0 "$@"
    fi
    libdir=/var/lib/pu
    umask 0022
    export LANG=en_US.utf8
    export LC_COLLATE=C
    # Recreate $libdir
    /bin/install -d -o root -g root -m 755 "$libdir"
    /bin/rm -rf "$libdir"/*.out
    if /usr/bin/tty -s ; then
    # Upgrade packages
    /usr/bin/pacman -Syu
    else
    # Update repos
    /usr/bin/pacman -Sy
    # List upgradeable packages
    /usr/bin/pacman -Qqu | /bin/sed -e 's/^/upgradeable /'
    fi
    echo
    # List new packages in repos
    /usr/bin/pacman -Slq | /usr/bin/sort -u > "$libdir/avail.out"
    [[ -f "$libdir/avail.prev" ]] || /bin/touch "$libdir/avail.prev"
    /usr/bin/comm -13 "$libdir/avail.prev" "$libdir/avail.out" | /usr/bin/xargs -r /usr/bin/pacman -Si
    /bin/mv -f "$libdir/avail.out" "$libdir/avail.prev"
    echo
    # List stray dependencies
    /usr/bin/pacman -Qqdt | /bin/sed -e 's/^/stray dep /'
    # List pacsave/pacorig/pacnew files in /etc
    /usr/bin/find /etc \( -name \*.pacnew -o -name \*.pacsave -o -name \*.pacorig \) | /bin/sed -e 's/^/pacfile /'
    # List files missing from packages
    /usr/bin/pacman -Qqk | /bin/sed -e 's/^/missing file /'
    # List new explicit packages
    # This also catches removals from base and base-devel
    /usr/local/bin/pacexp | /usr/bin/sort > "$libdir/pacexp.out"
    [[ -f "$libdir/pacexp.prev" ]] || /bin/touch "$libdir/pacexp.prev"
    /usr/bin/comm -13 "$libdir/pacexp.prev" "$libdir/pacexp.out" | /bin/sed -e 's/^/pacexp /'
    /bin/mv -f "$libdir/pacexp.out" "$libdir/pacexp.prev"
    # List new base / base-devel packages not installed
    /usr/bin/comm -13 <(/usr/bin/pacman -Qgq base base-devel | /usr/bin/sort -u) <(/usr/bin/pacman -Sgq base base-devel | /usr/bin/sort -u) > "$libdir/base.out"
    [[ -f "$libdir/base.prev" ]] || /bin/touch "$libdir/base.prev"
    /usr/bin/comm -13 "$libdir/base.prev" "$libdir/base.out" | /bin/sed -e 's/^/base-add /'
    /bin/mv -f "$libdir/base.out" "$libdir/base.prev"
    # List new version-mismatched AUR packages and new foreign packages
    for pkg in $(/usr/bin/pacman -Qqm | /usr/bin/sort | /usr/bin/tee "$libdir/foreign.out") ; do
    localver=$(/usr/bin/pacman -Q $pkg | /bin/cut -d\ -f2)
    aurver=$(/usr/bin/curl -s "http://aur.archlinux.org/rpc.php?type=info&arg=$pkg" | /bin/cut -d\" -f18)
    [[ -z "$aurver" ]] && continue
    [[ "$localver" != "$aurver" ]] && echo "$pkg: $localver -> $aurver"
    done > "$libdir/aur.out"
    [[ -f "$libdir/foreign.prev" ]] || /bin/touch "$libdir/foreign.prev"
    /usr/bin/comm -13 "$libdir/foreign.prev" "$libdir/foreign.out" | /bin/sed -e 's/^/foreign /'
    /bin/mv -f "$libdir/foreign.out" "$libdir/foreign.prev"
    [[ -f "$libdir/aur.prev" ]] || /bin/touch "$libdir/aur.prev"
    /usr/bin/comm -13 "$libdir/aur.prev" "$libdir/aur.out" | /bin/sed -e 's/^/aur /'
    /bin/mv -f "$libdir/aur.out" "$libdir/aur.prev"
    # Clean out old packages if cache gets too big
    if [[ $(/bin/du -sm /var/cache/pacman/pkg/ | /bin/cut -f1) -gt 1000 ]] ; then
    /usr/bin/pacman -Sc --noconfirm > /dev/null
    echo "clean cache"
    fi
    # Whack perms on pacman cache into shape
    /usr/bin/find /var/cache/pacman/pkg -type f ! -perm 644 -exec /bin/chmod 644 {} +

  • Binaries no longer in /usr/bin

    something weird happened in the past hour to MBP runnning OSX10.4.9
    I was attempting to use emacs and it dissapeared. in fact me entire /usr/bin is empty and issuing the command 'ls -la /usr/bin' takes about a minute to complete. And during that time the entire machine stalls.
    What is the best way to recover the /usr/bin binaries?
    Here is the file system information and the time output to show you the delay between the start and end of the "ls" command.
    ---- snip ----
    localhost:/usr root# whoami
    root
    localhost:/usr root# date && ls -al /usr/bin && date
    Sat Apr 28 18:36:18 PDT 2007
    Sat Apr 28 18:36:39 PDT 2007
    $ df -k
    Filesystem 1K-blocks Used Avail Capacity Mounted on
    /dev/disk0s2 97349872 79929700 17164172 82% /
    devfs 96 96 0 100% /dev
    fdesc 1 1 0 100% /dev
    <volfs> 512 512 0 100% /.vol
    automount -nsl [229] 0 0 0 100% /Network
    automount -fstab [255] 0 0 0 100% /automount/Servers
    automount -static [255] 0 0 0 100% /automount/static
    --- snip ---

    SO I had a series of major errors on my hard drive and I find it highly suspicious they occurred just after installing the MBP Battery update.
    http://www.apple.com/support/macbook_macbookpro/batteryupdate/
    Is there some sort of stupid "Smart sleep" going on that will make RAM disk writing get screwed up while the MBP is sleeping?

  • SOLVED /usr/bin/makepkg: line 552: build: command not found

    I'm trying to build a custom kernel, but am receiving this error:
    /usr/bin/makepkg: line 552: build: command not found
    I've searched all over for a fix, but haven't had any luck, it doesn't seem to be a common error, or it's so incredibly easy to fix that noone has bothered 
    Thanks for any help.
    /crobot

    Thanks for your response, it has failed on two builds, i'll post both.
    Here's the first:
    # $Id: PKGBUILD,v 1.26 2004/10/06 18:21:54 judd Exp $
    # Maintainer: judd <[email protected]>
    pkgname=kernel26
    pkgver=2.6.8.1
    pkgrel=3
    pkgdesc="The Linux Kernel and modules (IDE support)"
    url="http://www.kernel.org"
    backup=('boot/kconfig26')
    depends=('module-init-tools')
    install=kernel26.install
    source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.bz2
    config cdburning.patch logo_linux_clut224.ppm
    bio_uncopy_user-mem-leak.patch bio_uncopy_user-mem-leak-fix.patch
    http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/release/26-stable-release/acpi-20040715-2.6.8.diff.bz2)
    md5sums=('9517ca999e822b898fbdc7e72796b1aa' '20ad5bea85099dfcced9a6b91064b04e'
    '66b87662e6dd54b6324f874739fa1b99' '5a62bcc7e96601052c7405459b483826'
    'd2329bc663089cd99b8dbfd25b6a7ebc' '15a9165ae02c4a3a3875fb7924a68cbf'
    'e00d08709581f215b15e321d162f782c')
    build() {
    cd $startdir/src/linux-$pkgver
    patch -Np1 -i ../bio_uncopy_user-mem-leak.patch || return 1
    patch -Np1 -i ../bio_uncopy_user-mem-leak-fix.patch || return 1
    patch -Np1 -i ../cdburning.patch || return 1
    #patch -Np1 -i ../acpi-20040715-2.6.8.diff || return 1
    # Arch logo!
    cp ../logo_linux_clut224.ppm drivers/video/logo/
    # get rid of the 'i' in i686
    carch=`echo $CARCH | sed 's|i||'`
    cat ../config | sed "s|#CARCH#|$carch|g" >./.config
    yes "" | make config
    make clean bzImage modules || return 1
    mkdir -p $startdir/pkg/{lib/modules,boot}
    make INSTALL_MOD_PATH=$startdir/pkg modules_install || return 1
    cp System.map $startdir/pkg/boot/System.map26
    cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26
    install -D -m644 Makefile $startdir/pkg/usr/src/linux-$pkgver/Makefile
    install -D -m644 .config $startdir/pkg/usr/src/linux-$pkgver/.config
    install -D -m644 .config $startdir/pkg/boot/kconfig26
    mkdir -p $startdir/pkg/usr/src/linux-$pkgver/include
    mkdir -p $startdir/pkg/usr/src/linux-$pkgver/arch/i386/kernel
    for i in acpi asm-generic asm-i386 config linux math-emu net pcmcia scsi video; do
    cp -a include/$i $startdir/pkg/usr/src/linux-$pkgver/include/
    done
    # copy files necessary for later builds, like nvidia and vmware
    cp -a scripts $startdir/pkg/usr/src/linux-$pkgver/
    mkdir -p $startdir/pkg/usr/src/linux-$pkgver/.tmp_versions
    cp arch/i386/Makefile $startdir/pkg/usr/src/linux-$pkgver/arch/i386/
    cp arch/i386/kernel/asm-offsets.s $startdir/pkg/usr/src/linux-$pkgver/arch/i386/kernel/
    # copy in Kconfig files
    for i in `find . -name "Kconfig*"`; do
    mkdir -p $startdir/pkg/usr/src/linux-$pkgver/`echo $i | sed 's|/Kconfig.*||'`
    cp $i $startdir/pkg/usr/src/linux-$pkgver/$i
    done
    cd $startdir/pkg/usr/src/linux-$pkgver/include && ln -s asm-i386 asm
    chown -R root.root $startdir/pkg/usr/src/linux-$pkgver
    cd $startdir/pkg/lib/modules/$pkgver &&
    (rm -f source build; ln -sf /usr/src/linux-$pkgver build)
    Here's the second:
    ###### Give the kernel a unique name (for multiple builds - can be empty)
    _kerrev=crobot
    ###### Choose generic name, version, and release. updated later for $_kerrev
    pkgname=kernel26
    pkgver=2.6.8.1
    pkgrel=1
    pkgdesc="Custom Linux Kernel and modules"
    url="http://www.kernel.org"
    depends=('module-init-tools')
    ###### Add a default config file and any patches to be applied to source array
    source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.bz2)
    ###### Add md5 checksums here:
    #md5sum=()
    getvar() {
    old=$(cat Makefile | grep "^$1")
    echo $(echo ${old/"$1 ="/} | sed -e "s/[ ]*(.*)[ ]*/1/g")
    return 0
    build() {
    cd $startdir/src/linux-$pkgver
    ###### apply patches here
    # patch -p1 < ../patch1 #model
    #get rid of i in i686 in default config
    carch=`echo $CARCH | sed 's|i||'`
    cat ../config | sed "s|#CARCH#|$carch|g" >./.config
    ###### Choose one of the following configuration types
    ###### Use first option for config in source array
    #yes "" | make config
    #make oldconfig || return 1
    make menuconfig
    #make xconfig
    #make gconfig
    ##### No user changes below here
    # save the configuration with today's date
    cp ./.config ../../NEWCONFIG-$(date +%b%d)
    # set EXTRAVERSION to create unique /lib/modules/ subdirectories
    _ker_extraversion=$(getvar "EXTRAVERSION")
    # update EXTRAVERSION in the Makefile by adding our _kerrev
    _oldline=$(cat Makefile | grep "^EXTRAVERSION")
    if [ $_kerrev != "" ]; then
    _ker_extraversion="$_ker_extraversion-$_kerrev"
    cat Makefile | sed "s|$_oldline|EXTRAVERSION = $_ker_extraversion|" > tmpMake
    mv tmpMake Makefile
    fi
    _kerrev=$_ker_extraversion
    kerver=$(getvar "VERSION").$(getvar "PATCHLEVEL").$(getvar "SUBLEVEL")
    # update the package information from the kernel Makefile
    # (just in case the Makefile changed during a patch)
    pkgver=$kerver$(echo $_kerrev | sed -e 's/-/./g')
    pkgdesc="Custom Linux Kernel and modules version: $kerver revision: $_kerrev /
    package ver: $pkgver build: $pkgrel"
    # changing the package name
    # removing patches versions from the revision string
    _t=$(echo $_kerrev | sed -e "s/^..[0-9]*//g")
    # _t=$(echo $_t | sed -e "s/^-rc[0-9]?*//g")
    # _suf contains the suffix identifying the kernel (it has the versions removed from
    it)
    _suf=$(echo $_t | sed -e "s/[0-9]*-/-/g")
    pkgname=kernel26$_suf
    echo "Package name: $pkgname"
    echo "Package ver: $pkgver"
    echo "Package desc: $pkgdesc"
    sleep 5
    make clean bzImage modules || return 1
    mkdir -p $startdir/pkg/{lib/modules,boot}
    make INSTALL_MOD_PATH=$startdir/pkg modules_install || return 1
    # create unique names in /boot/
    cp System.map $startdir/pkg/boot/System.map26$_suf
    cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26$_suf
    install -D -m644 Makefile $startdir/pkg/usr/src/linux-$kerver/Makefile
    install -D -m644 .config $startdir/pkg/usr/src/linux-$kerver/.config
    install -D -m644 .config $startdir/pkg/boot/kconfig26$_suf
    mkdir -p $startdir/pkg/usr/src/linux-$kerver/include
    mkdir -p $startdir/pkg/usr/src/linux-$kerver/arch/i386/kernel
    for i in acpi asm-generic asm-i386 config linux math-emu net pcmcia scsi video; do
    cp -a include/$i $startdir/pkg/usr/src/linux-$kerver/include/
    done
    # copy files necessary for later builds, like nvidia and vmware
    cp -a scripts $startdir/pkg/usr/src/linux-$kerver/
    mkdir -p $startdir/pkg/usr/src/linux-$kerver/.tmp_versions
    cp arch/i386/Makefile $startdir/pkg/usr/src/linux-$kerver/arch/i386/
    cp arch/i386/kernel/asm-offsets.s
    $startdir/pkg/usr/src/linux-$kerver/arch/i386/kernel/
    # copy in Kconfig files
    for i in `find . -name "Kconfig*"`; do
    mkdir -p $startdir/pkg/usr/src/linux-$kerver/`echo $i | sed 's|/Kconfig.*||'`
    cp $i $startdir/pkg/usr/src/linux-$kerver/$i
    done
    cd $startdir/pkg/usr/src/linux-$kerver/include && ln -s asm-i386 asm
    chown -R root.root $startdir/pkg/usr/src/linux-$kerver
    # create a unique subdirectory under /usr/src/
    cd $startdir/pkg/usr/src
    mv linux-$kerver linux-$kerver$_kerrev
    cd $startdir/pkg/lib/modules/$kerver$_kerrev &&
    (rm -f build; ln -sf /usr/src/linux-$kerver$_kerrev build)
    Thanks,
    /crobot

  • Make: /usr/bin/ar: Command not found

    Dear Team,
    Following error are encountered while installing 11gR2 on RHEL 5.5.
    make file log:
    /usr/bin/make -f ins_rdbms.mk rat_on part_on dm_on olap_on sdo_on ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1//bin/sh: /usr/bin/ar: No such file or directory
    /usr/bin/ar cr /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/libknlopt.a /u01/app/oracle/product/11.2.0/db_1/rdbms/lib/kecwr.o
    make: /usr/bin/ar: Command not found
    make: *** [rat_on] Error 127
    - All rpms requirements are met. I have re-install GCC as well.
    Thanks in Adv.
    Yuvraj

    # yum provides /usr/bin/ar
    Loaded plugins: security
    binutils-2.17.50.0.6-14.el5.x86_64 : A GNU collection of binary utilities.
    Repo        : el5_u5_base
    Matched from:
    Filename    : /usr/bin/ar
    # ll /usr/bin/ar
    -rwxr-xr-x 1 root root 52632 Feb 11  2010 /usr/bin/arCould your file system or system installation be damaged?
    Perhaps you can try the following:
    # touch /forcefsck
    reboot

Maybe you are looking for