I am using Linux 2.6.18-164.el5 #1 SMP. compiled on Thu Sep 3 03:33:56
2009.
Using a .htaccess and .htpasswd to protect some folders. Not sure at
all if that method from the 80's is still fine.
To move these files within folders, I am using .txt extentions :
htaccess.txt and htpasswd.txt
Once in the appropriate folder : linux command : mv
htaccess.txt .htaccess
So, .htaccess become an hidden file through FTP, and can't be edited
in FTP.
As a consequence, I use linux to see the file : ls -a *
ls -a * (do not ignore entries starting with).
I the past ls -a * was working and listing all hidden files as it is
supposed to DO. Now, may be due to the new fashion in computer
sciences : that does not work anymore as it is supposed to WORK.
Question : "How to list the hidden files using Linux 2009" ?
Thank you Madams and Sirs for your time and patience in this regard.
Cougloff
Oh boy...
> Hi all,
>
> I am using Linux 2.6.18-164.el5 #1 SMP. compiled on Thu Sep 3 03:33:56
> 2009.
This isn't going to be a php question, is it?
> Using a .htaccess and .htpasswd to protect some folders. Not sure at
> all if that method from the 80's is still fine.
Nope. *sigh*
> To move these files within folders, I am using .txt extentions :
> htaccess.txt and htpasswd.txt
>
> Once in the appropriate folder : linux command : mv
> htaccess.txt .htaccess
>
> So, .htaccess become an hidden file through FTP, and can't be edited
> in FTP.
Um...that's not true. I seriously hope you're not "securing" file by
prepending them with a "."
> As a consequence, I use linux to see the file : ls -a *
>
> ls -a * (do not ignore entries starting with).
Well, that comes down to how your shell interprets the glob...You're
saying "list (ls) all (-a) files for everything that matches *", and
leaving it up to your shell to determine what files match *. I don't
know what shell you were using on your last distro, but bash will in
fact ignore .* when given the glob *. Not to mention, that's just not
at all what you want--don't believe me, put a sub-directory in there.
I'm too tired today to explain it. Just use "ls -a".
> I the past ls -a * was working and listing all hidden files as it is
> supposed to DO. Now, may be due to the new fashion in computer
> sciences : that does not work anymore as it is supposed to WORK.
Yes it does. As far as new fashion, I wear khakis, button-down dress
shirts and drive a sports car. Never got into the whole Buddy Holly
glasses and pocket protector thing ;)
> Question : "How to list the hidden files using Linux 2009" ?
man ls, same as "Linux 1989"
> Thank you Madams and Sirs for your time and patience in this regard.
Next time, alt.linux.n00bs
> As a consequence, I use linux to see the file : ls -a *
>
> ls -a * (do not ignore entries starting with).
>
> In the past ls -a * was working and listing all hidden files as it is
> supposed to DO.
Wrong! In the past you were in fact just typing ls -a
without the *.
The * tells the shell to match all <files> which are present, and
not any of the <.files> because .file does not match *.
If you wanted to list all of the .file entries in the current
directory you would need to type
ls -d .??*
This assumes you have no files or subdirectories which are named
.<single_character>
The purpose of the ?? is to suppress matching of just . and ..
> I am using Linux 2.6.18-164.el5 #1 SMP. compiled on Thu Sep 3 03:33:56
> 2009.
Had been more informative to tell that you are using RedHat 5.4 or CentOS 5.4.
> Using a .htaccess and .htpasswd to protect some folders. Not sure at
> all if that method from the 80's is still fine.
Sure, this is far more effective way than the backward striving MS uses in
their IIS.
> To move these files within folders, I am using .txt extentions :
> htaccess.txt and htpasswd.txt
Why? Feels so 80's, like using MS file system vfat.
> Once in the appropriate folder : linux command : mv
> htaccess.txt .htaccess
> So, .htaccess become an hidden file through FTP, and can't be edited
> in FTP.
That depends on the ftp server settings, files starting with a dor can still
be seen through ftp, if the ftp server don't deliberately not inform about
those files to the ftp client.
> As a consequence, I use linux to see the file : ls -a *
>
> ls -a * (do not ignore entries starting with).
"ls -a *" will show you the content of directories, which is really annoying,
use "ls -a" instead, that way you see content of your current directory, and
you don't have to scroll a million rows.
> I the past ls -a * was working and listing all hidden files as it is
> supposed to DO. Now, may be due to the new fashion in computer
> sciences : that does not work anymore as it is supposed to WORK.
ls -a
> Question : "How to list the hidden files using Linux 2009" ?
There is no Linux 2009, latest released stable version of Linux is 2.6.33 and
somewhat soon 2.6.34 will be released.
Did remove "comp.lang.php" from the newsgroups list, as it's not a relevant
newsgroup for your post.
--
//Aho
That might does not come from the hidden file problem.
I created a
Linux : vi rodeo_chan.txt
And I cant view it using ls * or ls -a or ls -a *
That's a basic .txt file !!
I am actually pretty sure that it is coming from the index search
feature. Something I am not used to.
There is a function to refresh the index ? Which one ?
Thank you Sirs for your information, always interesting.
Cougloff,
Sir Miller : The .txt file can be read using
ls -d .?? *
But, the .htaccess cannot be viewed
[root@cougloff] ls -d .?? *
ls: .??: No such file or directory
_chez-il delete pier
> Any new feature to view the hidden files ? .htaccess file.
Like an search index (like in the desktop search tools) that must be
refreshed to re-index ?
ls -a * was perfectly working in the 80's !
Still OT, but, are you using the same shell? (hint: if you're using
bash, then the answer's "no") I don't use any shells that are >20
years old, so I don't know if there was support for the dotglob option
that bash has. But, who cares? Fundamentally, you're trying to mock
up permissions via some stupid convoluted renaming scheme which
probably only demonstrates the behavior you're expecting on your
particular FTP client (which I'm sure is from the 80s as well).
Quit all the cantankerous bitching, use 'ls -a', and go pick up a copy
of "Linux in a Nutshell" because you're obviously clueless on the
relationship between software, shell and kernel. Learn how to chmod
while you're at it and quit bothering comp.lang.php with OTBS.
>Sir Miller : The .txt file can be read using
>
>ls -d .?? *
This is not what he wrote.
>But, the .htaccess cannot be viewed
Use the command _exactly_ as given by the previous poster.
>[root@cougloff] ls -d .?? *
>ls: .??: No such file or directory
>_chez-il delete pier
>
>> Any new feature to view the hidden files ? .htaccess file.
>
>Like an search index (like in the desktop search tools) that must be
>refreshed to re-index ?
>
>ls -a * was perfectly working in the 80's !
As said - you want to omit the '*'.
Micha
Did you save before you quit? Do you really have the privilege to store files
in the directory?
> I am actually pretty sure that it is coming from the index search
> feature. Something I am not used to.
Talking about the index listing in apache? are you sure your apache is
configure to list files in a directory? This are quite commonly disabled.
If you are talking about indexing like slocate does, then you need to use
"locate" to use it, and the slocate database isn't updated that often, so a
newly added file won't be found and there are directories that are excluded.
> There is a function to refresh the index ? Which one ?
As no one knows what the heck you are talking about, it's not possible to help
you, please take it step by step how you do things, start from when you
connect to the RedHat/CentOS machnine.
--
//Aho
1- LOCATE
locate .htaccess
/usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/
libraries/.htaccess
>>>> Linux does not show my .htaccess created ... so, I wonder if the search device must be refreshed to re-index all files on the hard-drive.
2- ls -d .?? *
That one does not show the hidden files within a folder. An hidden
file is for instance a file named .htaccess that secure the folder
access.
ls -a * was working FINE before and THAT DOES NOT WORK normally
anymore.
3- Mail destroyed.
Upgrading from PHP 3 to PHP 5 killed our mail flow.
We do not receive anymore the emails in HTML format because PHP adds a
line on the top : Content-type: text/html; charset=iso-8859-1
Second, The sender name is not referenced anymore.
Microsoft is not the subject, but, when Microsoft goes from XP to
Vista, they ensure that 99% of the applications will still work on the
new platform. The 1% that does not work are bad applications or, or,
or . . . end of little story about the 1%.
We will struggle to have the mail flow back, and ensured the PHP.INI
enable function to open socket ... but if you have anything about "PHP
5.0 corrupts my email flow" I would again please ask you and the group
to receive my best thanks.
Cougloff
>
> Thank you!
>
> 1- LOCATE
> locate .htaccess
> /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/
> libraries/.htaccess
>>>>> Linux does not show my .htaccess created ... so, I wonder if the
>>>>> search device must be refreshed to re-index all files on the
>>>>> hard-drive.
The slocate database is updated nightly in a cron job. To update it manually
run: updatedb
(you must be root)
> 2- ls -d .?? *
> That one does not show the hidden files within a folder. An hidden
> file is for instance a file named .htaccess that secure the folder
> access.
> ls -a * was working FINE before and THAT DOES NOT WORK normally
> anymore.
ls -a
Will show all .* files.
> 3- Mail destroyed.
> Upgrading from PHP 3 to PHP 5 killed our mail flow.
> We do not receive anymore the emails in HTML format because PHP adds a
> line on the top : Content-type: text/html; charset=iso-8859-1
> Second, The sender name is not referenced anymore.
No idea what you're talking about there.
> Microsoft is not the subject, but, when Microsoft goes from XP to
> Vista, they ensure that 99% of the applications will still work on the
> new platform. The 1% that does not work are bad applications or, or,
> or . . . end of little story about the 1%.
This couldn't be more inaccurate. Microsoft has compatibility issue even
with their own software. What that has to do with your question I have no
idea.
> We will struggle to have the mail flow back, and ensured the PHP.INI
> enable function to open socket ... but if you have anything about "PHP
> 5.0 corrupts my email flow" I would again please ask you and the group
> to receive my best thanks.
We would need to know more about what you're talking about... I assume
you're using some kind of PHP e-mail system?
--
"All right, all right, if it will make you happy, I will overthrow society."
- Philip J. Fry
> ls -d .?? *
^
^
Omit the SPACE!
ls -d .??*
And to list everything in the directory, both dot and regular files
just do
ls -a
WITHOUT the * (as other have kindly stated)
To get a fuller listing of everything, both dot and regular files
just do
ls -als
WITHOUT a *
ls -d .??* shows .htaccess file within a directory.
ls -a shows all normal files while ls -als shows all files including
hidden files as .htaccess
But, if I study the help library ls --help : I see that these commands
are not standard. So, it was not possible for us to have these tips
and tricks only studying the documentation. The question was
mandatory. Thank you for your answer.
Cougloff
> But, if I study the help library ls --help : I see that these commands
> are not standard.
ls -a is about as standard as it gets ;)
Try the command "man ls", which produces the output --
NAME
ls - list directory contents
SYNOPSIS
ls [OPTION]... [FILE]...
DESCRIPTION
List information about the FILEs (the current directory by
default).
Sort entries alphabetically if none of -cftuvSUX nor --sort.
Mandatory arguments to long options are mandatory for short
options
too.
-a, --all
do not ignore entries starting with .
A manual page (if available) will provide you with a much more
detailed explanation than the output of <command> --help
And if you are not sure what command is appropriate for a particular
job, try the apropos command (or whatis, which acts like man -k),
eg apropos help
I think you are confused. ls -als is the same as ls -a -l -s, and
all three of those are shown in ls --help.
als is NOT an option, it is three different options.
multiletter options must be proceeded by -- as with ls --help
Note that ls -a shows files such as .htaccess as well.
Search any function with MSDN for a C++ development ... honestly, the
explain is clear.
The idea where Linux or PHP do not offer an exhaustive information
about a defined function (like ls --help) is not professional. PHP
upgrades of versions where the user must rewrite all his website is a
pure nightmare existing today, in 2010 with PHP 5.
Well, the only language we know is Linux + PHP, and Microsoft is
offering a totally different language ... seems complicated. If Linux
& PHP are the English for us, Microsoft is the swedish language for
us ...
.... Hopefully, somewhere, we will meet an organization of knowledge
(library based) within that tips-and-tricks based languages of Linux
and PHP.
Cougloff.
> The idea where Linux or PHP do not offer an exhaustive information
> about a defined function (like ls --help) is not professional.
Uh...
Your understanding, not the tools you don't understand, is the issue.
ls --help:
Usage: ls [OPTION]... [FILE]...
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort.
Mandatory arguments to long options are mandatory for short options too.
-a, --all do not ignore entries starting with .
-A, --almost-all do not list implied . and ..
--author with -l, print the author of each file
-b, --escape print octal escapes for nongraphic characters
--block-size=SIZE use SIZE-byte blocks
-B, --ignore-backups do not list implied entries ending with ~
-c with -lt: sort by, and show, ctime (time of
last
modification of file status information)
with -l: show ctime and sort by name
otherwise: sort by ctime
-C list entries by columns
--color[=WHEN] control whether color is used to distinguish
file
types. WHEN may be `never', `always', or
`auto'
-d, --directory list directory entries instead of contents,
and do not dereference symbolic links
-D, --dired generate output designed for Emacs' dired mode
-f do not sort, enable -aU, disable -lst
-F, --classify append indicator (one of */=>@|) to entries
--file-type likewise, except do not append `*'
--format=WORD across -x, commas -m, horizontal -x, long -l,
single-column -1, verbose -l, vertical -C
--full-time like -l --time-style=full-iso
-g like -l, but do not list owner
-G, --no-group like -l, but do not list group
-h, --human-readable with -l, print sizes in human readable format
(e.g., 1K 234M 2G)
--si likewise, but use powers of 1000 not 1024
-H, --dereference-command-line
follow symbolic links listed on the command
line
--dereference-command-line-symlink-to-dir
follow each command line symbolic link
that points to a directory
--hide=PATTERN do not list implied entries matching shell
PATTERN
(overridden by -a or -A)
--indicator-style=WORD append indicator with style WORD to entry
names:
none (default), slash (-p),
file-type (--file-type), classify (-F)
-i, --inode with -l, print the index number of each file
-I, --ignore=PATTERN do not list implied entries matching shell
PATTERN
-k like --block-size=1K
-l use a long listing format
-L, --dereference when showing file information for a symbolic
link, show information for the file the link
references rather than for the link itself
-m fill width with a comma separated list of
entries
-n, --numeric-uid-gid like -l, but list numeric user and group IDs
-N, --literal print raw entry names (don't treat e.g. control
characters specially)
-o like -l, but do not list group information
-p, --indicator-style=slash
append / indicator to directories
-q, --hide-control-chars print ? instead of non graphic characters
--show-control-chars show non graphic characters as-is (default
unless program is `ls' and output is a
terminal)
-Q, --quote-name enclose entry names in double quotes
--quoting-style=WORD use quoting style WORD for entry names:
literal, locale, shell, shell-always, c,
escape
-r, --reverse reverse order while sorting
-R, --recursive list subdirectories recursively
-s, --size with -l, print size of each file, in blocks
-S sort by file size
--sort=WORD extension -X, none -U, size -S, time -t,
version -v, status -c, time -t, atime -u,
access -u, use -u
--time=WORD with -l, show time as WORD instead of
modification
time: atime, access, use, ctime or status; use
specified time as sort key if --sort=time
--time-style=STYLE with -l, show times using style STYLE:
full-iso, long-iso, iso, locale, +FORMAT.
FORMAT is interpreted like `date'; if FORMAT is
FORMAT1<newline>FORMAT2, FORMAT1 applies to
non-recent files and FORMAT2 to recent files;
if STYLE is prefixed with `posix-', STYLE
takes effect only outside the POSIX locale
-t sort by modification time
-T, --tabsize=COLS assume tab stops at each COLS instead of 8
-u with -lt: sort by, and show, access time
with -l: show access time and sort by name
otherwise: sort by access time
-U do not sort; list entries in directory order.
In combination with one_per_line format `-1',
it will show files immediately and it has no
memory limitations.
-v sort by version
-w, --width=COLS assume screen width instead of current value
-x list entries by lines instead of by columns
-X sort alphabetically by entry extension
-1 list one file per line
SELinux options:
--lcontext Display security context. Enable -l. Lines
will probably be too wide for most displays.
-Z, --context Display security context so it fits on most
displays. Displays only mode, user, group,
security context and file name.
--scontext Display only security context and file name.
--help display this help and exit
--version output version information and exit
SIZE may be (or may be an integer optionally followed by) one of following:
kB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.
By default, color is not used to distinguish types of files. That is
equivalent to using --color=none. Using the --color option without the
optional WHEN argument is equivalent to using --color=always. With
--color=auto, color codes are output only if standard output is connected
to a terminal (tty). The environment variable LS_COLORS can influence the
colors, and can be set easily by the dircolors command.
Exit status is 0 if OK, 1 if minor problems, 2 if serious trouble.
Report bugs to <bug-co...@gnu.org>.
> I the past ls -a * was working and listing all hidden files as it is
> supposed to DO. Now, may be due to the new fashion in computer
I know it's been a while since you posted this, but I just got
around to checking. :-)
With bash, the only way that would show hidden files, would be if
you, or your startup scripts ran "shopt -s dotglob" first.
Regards, Dave Hodgins
--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)