Rename a file with hexa decimal characters
Hi all,
I am trying to rename a file with hexadecimal characters(not the regular ASCII characters) so that i can hide my files from other users.Could you please help me out in this regard. Thanks |
What do you mean?
|
That won't hide your files from other users.
Forrest |
ok ...how would i rename my file such that it is not displayed in the ls all option ? What should be done in order that the file name is not displayed when i use ls to list the file with the all option .
Thanks |
Can't you just rename the file to something innocuous and use simple encryption (like 'openssl enc -e -bf -in inputfile -out outputfile') instead of trying to dodge 'ls'?
|
I want a simple rename and very simple thing of to not display the filename when used with ls.
|
ls -a, list all, does just that, it lists ALL files. Unless you can figure out how to have a file that isn't a file, you aren't going to be able to do it. You can encrypt the file so only you can open it, but you can't make it so it isn't able to be seen with ls. You can rename it to " " but even that will show up in ls.
Code:
/home/forrest% touch \ <-- there is a space here I'm not sure I want to know why you want to do this. HTH Forrest |
Quote:
|
When you remove a file using the rm command (or directly using the unlink system call), Linux decrements the link counter for that file. When the link counter reaches 0 the file is actually deleted from the disk, but not until then.
When you create a hard link to file, the counter is incremented, so if the file is deleted using the original path, the counter gets decremented but because there is still a link to the file from the new location, it is not removed from the disk. When a program opens a file, the link count is also incremented until either the program terminates or the file is closed in the program. You could "hide" a file by opening it in a program, unlinking it from the directory, but keep the program running with the file open. One could conceive of a mechanism by which a daemon process holds a file open in this manner, and will provide the data to programs via some IPC interface - perhaps using shared memory or sockets. The snag is that if the program terminates (e.g. it crashes or the system is rebooted), the file will be lost, and of course you can't the use regular disk IO mechanisms on the file. |
Create a directory with your private access attributes, and move all your personal files there. Other users, besides root, won't be able to 'ls' on this directory, they would get: /home/your_name/my_private: Permission denied
|
unSpawn, I'll take your word for it. It's not something that I would think possible with standard commands (and I would hope if it is it would be considered a bug and fixed).
So, as far as I'm concerned my advice stands, "you can't make it so it isn't able to be seen with ls." You may however be able to break your file system and get it to not be seen, but I wouldn't advise that. Also, I'm assuming this is a non-root user, otherwise, just make an unmounted filesystem. Forrest |
Quote:
|
If you set your home dir and other dirs and all files to rw only for owner (and x where reqd) and group and other perms to none (---) then only you can see them eg
rwx------ executable files only or rw------- non-exes eg chmod -R u=rw,go= * chmod u=rwx,go= *.sh and others eg .pl, binaries |
Yes, you're both right: kernel or binary subversion.
|
All times are GMT -5. The time now is 08:30 PM. |