05-23-2002
File and Directory Names become hidden
Something very weird has been happening when I'm creating files and directories. When I create a directory, at times depending on the directory name and depth, it becomes hidden and can only be seen typing "ls -a". When I say the name of the directory matters, "my_c++" will be hidden but using the name "testdir" will be fine. Even more puzzling is the problem when I'm creating files. Again it depends on the name. A file name "dat052302" is okay, but "dat052302.dos" becomes hidden, and "ls -a" or "ls -l" doesn't show the existing file. So when I type "ls" to list the contents of the directory, the new file is not in the list. This happens when I create the file using an editor, a c++ program, and by copying from another file! For example, if I copy a file that is not hidden, the destination file becomes hidden, so "cp dat052302 dat052302.dos" will create the "dat052302.dos" file but it will be hidden.
I'm using Sun Solaris 8, Ultra 10.
If anyone has encountered a similar problem or might know how to fix this, PLEASE let me know, I would greatly appreciate it.
Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Haveing an issue. Anytime a file is created with "01" (zero one) in the name - it cannot be viewed by LS or any other file listing command. Although the file is there, it cannot be seen. I can edit it, run it, anything, except see it.....
What happened? Any ideas? (8 Replies)
Discussion started by: n9ninchd
8 Replies
2. Shell Programming and Scripting
Hi,
Consider a flat file abc.conf contains some rows. Each row contains the directory name with full path. now I want to find a particular file in every directory which are mentioned in the abc.conf file. How it can be done through unix shell script. (2 Replies)
Discussion started by: surjyap
2 Replies
3. UNIX for Dummies Questions & Answers
Hi,
If I have a directory full of say 100 random files, and I would like to organize them, for example: FILE001, FILE002, FILE003, FILE004, etc.
How would I do this from Terminal, instead of manually changing each file? I'm using Mac OS X, if that makes a difference.
Thank you in advance... (8 Replies)
Discussion started by: andou
8 Replies
4. UNIX for Dummies Questions & Answers
Hi ,
I have a list of files in the directory I want to sort based on the file name.
But in the middle of filename contains the number based on that I need to sort.Could you suggest me on the same?
Example filenames:
/user1$ls
RS.DEV.ISV.F1.RS.REFDATA.DATA... (1 Reply)
Discussion started by: praveen.thumati
1 Replies
5. Shell Programming and Scripting
Sun Solaris Unix Question
Haven't been able to find any solution for this situation. Let's just say the file names listed below exist in a directory. I want the find command to find all files in this directory but at the same time I want to eliminate certain file names or files with certain... (2 Replies)
Discussion started by: 2reperry
2 Replies
6. UNIX for Advanced & Expert Users
I want to backup all the directory tress, including hidden directories, without copying any files.
find . -type d gives the perfect list.
When I tried tar, it won't work for me because it tars all the files.
find . -type d | xargs tar -cvf a.tar
So i tried rsync.
On my own test box, the... (4 Replies)
Discussion started by: fld2007
4 Replies
7. Shell Programming and Scripting
got it figured out :) (1 Reply)
Discussion started by: sHockz
1 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
Can any one help me to list out the directory names which contain the specified file.
See for example
File name : file.201307014.LKT
Have the directory structure as below.
/app/work/data/INDIA/file.201307014.LKT
/app/work/data/AMERICA/file.201307014.KTP... (5 Replies)
Discussion started by: Balasankar
5 Replies
9. Shell Programming and Scripting
Dears,
Would you please help on following bash script:
I want to get the most recent file named alfaYYYYMMDD.gz in one directory:
for example:
in directory /tmp/
ls -ltr
alfa20130715.gz
holding.gz
alfa20130705.gz
sart.txt
merge.txt.gz
alfa20130802.gz
my result shoud be... (1 Reply)
Discussion started by: maxsub
1 Replies
10. UNIX for Beginners Questions & Answers
Hi, I have about 60 files in a directory and need to rename those files. For example the file names are
i_can_phone_yymmdd.txt (where yymmdd is the date. i.e 170420 etc)
i_usa_phone_1_yymmdd.txt
i_eng_phone_4_yymmdd.txt
The new file names should be
phone.txt
phone_1.txt
phone_4.txt
I am... (4 Replies)
Discussion started by: naveed
4 Replies
LEARN ABOUT CENTOS
tk::dirtree
DirTree(3) User Contributed Perl Documentation DirTree(3)
NAME
Tk::DirTree - Create and manipulate DirTree widgets
SYNOPSIS
use Tk::DirTree;
$dirtree = $parent->DirTree(?options?);
SUPER-CLASS
The DirTree class is derived from the Tree class and inherits all the methods, options and subwidgets of its super-class.
STANDARD OPTIONS
Tree supports all the standard options of a Tree widget. See Tk::options for details on the standard options.
WIDGET-SPECIFIC OPTIONS
Name: browseCmd
Class: BrowseCmd
Switch: -browsecmd
Specifies a callback to call whenever the user browses on a directory (usually by single-clicking on the name of the directory). The
callback is called with one argument, the complete pathname of the directory.
Name: command
Class: Command
Switch: -command
Specifies the callback to be called when the user activates on a directory (usually by double-clicking on the name of the directory).
The callback is called with one argument, the complete pathname of the directory.
Name: dircmd
Class: DirCmd
Switch: -dircmd
Specifies the callback to be called when a directory listing is needed for a particular directory. If this option is not specified, by
default the DirTree widget will attempt to read the directory as a Unix directory. On special occasions, the application programmer may
want to supply a special method for reading directories: for example, when he needs to list remote directories. In this case, the
-dircmd option can be used. The specified callback accepts two arguments: the first is the name of the directory to be listed; the
second is a Boolean value indicating whether hidden sub-directories should be listed. This callback returns a list of names of the sub-
directories of this directory. For example:
sub read_dir {
my( $dir, $showhidden ) = @_;
return( qw/DOS NORTON WINDOWS/ ) if $dir eq "C:\";
return();
}
Name: showHidden
Class: ShowHidden
Switch: -showhidden
Specifies whether hidden directories should be shown. By default, a directory name starting with a period "." is considered as a hidden
directory. This rule can be overridden by supplying an alternative -dircmd option.
Name: directory
Class: Directory
Switch: -directory
Alias: -value
Specifies the name of the current directory to be displayed in the DirTree widget.
DESCRIPTION
The DirTree constructor method creates a new window (given by the $dirtree argument) and makes it into a DirTree widget. Additional
options, described above, may be specified on the command line or in the option database to configure aspects of the DirTree such as its
cursor and relief. The DirTree widget displays a list view of a directory, its previous directories and its sub-directories. The user can
choose one of the directories displayed in the list or change to another directory.
WIDGET METHODS
The DirTree method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used
to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.
The following additional methods are available for DirTree widgets:
$dirtree->chdir(dir)
Change the current directory to dir.
OTHER METHODS
These methods have to be documented or made private:
OpenCmd
Populate
add_to_tree
dirnames
fullpath
has_subdir
opencmd
set_dir
BINDINGS
The mouse and keyboard bindings of the DirTree widget are the same as the bindings of the Tree widget.
KEYWORDS
directory, tree, tix
SEE ALSO
Tk::Tree Tk::HList
AUTHOR
Perl/TK version by Chris Dean <ctdean@cogit.com>. Original Tcl/Tix version by Ioi Kim Lam.
perl v5.16.3 2014-06-10 DirTree(3)