?
Solved

Redhat9 hidden folder - Howto

Posted on 2004-03-24
3
Medium Priority
?
286 Views
Last Modified: 2010-04-20
How to hidden the folder in Redhat9 without using GUI such as GNOME or KDE...i mean in command line...thanks
0
Comment
Question by:learner79
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 12

Expert Comment

by:paullamhkg
ID: 10673850
normally you can create a hidden folder by add a dot infont of the folder name like this

mkdir .hiddenfolder

so the folder can not be see in normal way, but still can see using ls -al

if the folder already exist, try create as mentioned above and copy the data inside .

but why hidden it, try to thinking of protect it, that's mean restrict users to access other folders except his own by using chroot, have a check here http://www.tjw.org/chroot-login-HOWTO/
0
 
LVL 12

Accepted Solution

by:
stefan73 earned 40 total points
ID: 10675667
Hi learner79,

You can use all kinds of weird file names for your folder. For example, you can use the "cursor up" escape sequence in your file name:

perl -e 'rename "old file", "old file\x1b[A"'


Resulting in a different ls output:
sns452!mnstefan:~/other_stuff/hiding [107]> touch A B C
sns452!mnstefan:~/other_stuff/hiding [108]> ll
total 0
-rw-r--r--   1 mnstefan mnmaf          0 Mar 25 12:25 A
-rw-r--r--   1 mnstefan mnmaf          0 Mar 25 12:25 B
-rw-r--r--   1 mnstefan mnmaf          0 Mar 25 12:25 C
sns452!mnstefan:~/other_stuff/hiding [109]> perl -e 'rename "B", "B\x1b[A"'
sns452!mnstefan:~/other_stuff/hiding [110]> ll
total 0
-rw-r--r--   1 mnstefan mnmaf          0 Mar 25 12:25 A
-rw-r--r--   1 mnstefan mnmaf          0 Mar 25 12:25 C
sns452!mnstefan:~/other_stuff/hiding [111]>





More sequences:
http://www.inwap.com/pdp10/ansicode.txt

But that won't keep someone determined off your directory.

Cheers,

Stefan
0
 

Author Comment

by:learner79
ID: 10684199
Thank you
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month13 days, 21 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question