Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Unix Help

  • 19-02-2008 11:54pm
    #1
    Moderators, Science, Health & Environment Moderators Posts: 21,670 Mod ✭✭✭✭


    Its been a logn time since I used Unix and even then it was not that much


    I am trying to access this file 'find' in directory /usr/bin/find
    but when i do cd find in /usr/bin/ I get an error saying 'find' is not a directory.

    How can i access this file?


Comments

  • Registered Users, Registered Users 2 Posts: 5,112 ✭✭✭Blowfish


    Just type 'find'

    :)


  • Moderators, Science, Health & Environment Moderators Posts: 21,670 Mod ✭✭✭✭helimachoptor


    find: insufficient number of arguments
    find: path-list predicate-list



    I get this error blowfish?


  • Registered Users, Registered Users 2 Posts: 734 ✭✭✭Dero


    What exactly are you trying to do? I presume you're trying to find some file on your system, but some more detail might make it easier to get help.


  • Registered Users, Registered Users 2 Posts: 5,112 ✭✭✭Blowfish


    find: insufficient number of arguments
    find: path-list predicate-list



    I get this error blowfish?
    Find is a command used for locating files, it's not particularly useful unless you give it something to search for ;)

    Have a look here for an intro on how to use it.


  • Moderators, Science, Health & Environment Moderators Posts: 21,670 Mod ✭✭✭✭helimachoptor


    sorry blowfish her eis the path i am trying to get to...
    /usr/bin/find /transfer/ so find is just a step along it


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 5,112 ✭✭✭Blowfish


    sorry blowfish her eis the path i am trying to get to...
    /usr/bin/find /transfer/ so find is just a step along it
    Ah, well with that, there is a space between the '/usr/bin/find' bit and the '/transfer/' bit. Basically what that means is that you are trying to run the 'find' command (to search for file(s)) on the '/transfer/' folder (the folder you are looking for the file(s) in).


  • Moderators, Science, Health & Environment Moderators Posts: 21,670 Mod ✭✭✭✭helimachoptor


    Blowfish wrote: »
    Ah, well with that, there is a space between the '/usr/bin/find' bit and the '/transfer/' bit. Basically what that means is that you are trying to run the 'find' command (to search for file(s)) on the '/transfer/' folder (the folder you are looking for the file(s) in).

    I can see the space that is just a typo in the email i got and i copied from there,

    I am typing in usr/bin/find/transfer

    Or should i have the space in there?


  • Registered Users, Registered Users 2 Posts: 1,064 ✭✭✭Snowbat


    While 'find' is an executable binary file, like everything else in /bin and /usr/bin it is more useful to think of it as a command:
    eg. find -name *.mp3

    http://www.linux.ie/newusers/beginners-linux-guide/find.php
    http://linux.about.com/od/commands/l/blcmdl1_find.htm


  • Registered Users, Registered Users 2 Posts: 5,112 ✭✭✭Blowfish


    I can see the space that is just a typo in the email i got and i copied from there,

    I am typing in usr/bin/find/transfer

    Or should i have the space in there?
    Keep the space in there, it's not a typo.


  • Registered Users, Registered Users 2 Posts: 1,064 ✭✭✭Snowbat


    Are you looking for a for a file or directory called 'transfer' somewhere in your file system?

    cd /
    find -name transfer


  • Advertisement
  • Moderators, Science, Health & Environment Moderators Posts: 21,670 Mod ✭✭✭✭helimachoptor


    No transfer is another directory with 1 file in it that i need to run a a crontab command on, I've done what i am supposed to but now its asking me do i want to remove the directory which I dont

    Here is the full command i suppose this would have been a better place to start..

    /usr/bin/find /transfer/procesados/ -mtime +60 -exec rm {} \;

    Basically I want to delete the content of the directory every 60 days


    But not the actual directory


  • Registered Users, Registered Users 2 Posts: 734 ✭✭✭Dero


    Try

    /usr/bin/find /transfer/procesados/ -type f -mtime +60 -exec rm {} \;


  • Moderators, Science, Health & Environment Moderators Posts: 21,670 Mod ✭✭✭✭helimachoptor


    Dero wrote: »
    Try

    /usr/bin/find /transfer/procesados/ -type f -mtime +60 -exec rm {} \;

    Dero cheers that worked, I now will not have to go near unix for a longtime hopefully!
    Thanks to the rest of you guys too.


Advertisement