LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-13-2007, 03:49 PM   #1
Macska
LQ Newbie
 
Registered: Nov 2007
Posts: 7

Rep: Reputation: 0
Question sys_rename in user space


Hi,

When you call sys_rename in a user space program where does it place the renamed file? Does it put in the directory where you called the system call? I have a program that is calling sys_rename. It does not return -1 so Ithink it worked. But I cannot find the renamed file anywhere. I am trying to rename -> pathname to .pathname.trash
I hope someone can help.

Thank you
 
Old 11-13-2007, 04:14 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 11-13-2007, 06:42 PM   #3
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
man 2 rename
man 3p rename
 
Old 11-20-2007, 09:19 PM   #4
Macska
LQ Newbie
 
Registered: Nov 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Thank you for sys_rename response

Hi Osor,

Thank you for helping me with sys_rename. I realized after reading your post what I was doing wrong. I did have kernel space and user space confused. I ended up just calling do_rename within the system call of my kernel code. I wanted to thank you for taking the time to answer my question.

Macska
 
Old 11-21-2007, 11:48 AM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Moved: This thread is more suitable in <General> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 12-25-2007, 12:32 PM   #6
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Just curious, no criticism intended:
  1. What's the difference between "Linux-General" & "<General>"? Aren't they both short forms of:
    LinuxQuestions.org > Forums > Linux > Linux - General

  2. Given that Tinkster put it in "<General>", but it is still (at the time of this post) in
    LinuxQuestions.org > Forums > Linux > Linux - General
    Why have 2 of our best Mods. apparently moved this thread to the same place?
 
Old 12-26-2007, 08:22 AM   #7
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Linux-General is for the Linux technical questions that don't quite fit into the other technical forums. General is for non technical chat and Windows.

And dunno
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
notify user space application from the kernel space lordofring Linux - Software 2 06-22-2009 12:32 PM
How to share data b/w user space and kernel space nandac Linux - Kernel 1 11-28-2006 10:15 PM
User Space - Kernel Space basu_arani Programming 3 05-25-2004 11:46 AM
User web space? spintrance7 Linux - General 2 10-10-2003 04:17 PM
User space used grub Programming 6 06-11-2003 03:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration