我想列出从现在的目录开始的所有目录。 我不想把先前的名录(.)列入,因此我有的常规表述。 我正在使用sh子
ls .[^.]*
该公司在UNIX变量平台上进行罚款,但在太阳系中,我仍在使用这个薄子,但我只有目录。 我怎么能具体说明太阳系的确切功能 正式表述。 它用巴什开展工作,但我只需要使用sh子,因为保证能够在我们org的每个安全研究所盒子上找到。
我想列出从现在的目录开始的所有目录。 我不想把先前的名录(.)列入,因此我有的常规表述。 我正在使用sh子
ls .[^.]*
该公司在UNIX变量平台上进行罚款,但在太阳系中,我仍在使用这个薄子,但我只有目录。 我怎么能具体说明太阳系的确切功能 正式表述。 它用巴什开展工作,但我只需要使用sh子,因为保证能够在我们org的每个安全研究所盒子上找到。
You can do this with /bin/sh
, but with a slightly different syntax; it uses !
rather than ^
to negate the set of characters:
ls .[!.]*
Note that this is a file matching pattern (a glob), not a regular expression.
但是,鉴于你在由各种炮弹支持的glob syntax中再次看到的变化,你可能最好使用<条码>grep,并使用实际的定期表述。
www.un.org/Depts/DGACM/index_spanish.htm ow,我不知道他们仍然说: 页: 1 因此,我不知道太阳星号(
ls `ls -a | grep ^.[^.].* `
The -a
for ls
tells it to include all the dot-files in the list and then a bit of grep
for dealing with the dots. That matches what ls .[^.]*
does in OSX s csh
, hopefully it will work with Solaris s as well.
Character classes in globs in csh don t support negation...
• 从太阳的人类网页上:
[...] Match any single character in the enclosed list(s) or
range(s). A list is a string of characters. A range
is two characters separated by a dash (-), and
includes all the characters in between in the ASCII
collating sequence (see ascii(5)).
因此,你可以创建一种特性类别,包括: 40(空间)到(......之前的特性,从/到(其余可打印的正文)。
ls -a .[ --/-~]*
This seems to work for me, but I haven t checked the output with a fine-toothed comb.
I m running 64-bit Solaris 10, and I have self-compiled Perl 5.10 and Postgresql 8.4.1 installed in /usr/local, both 64 bits. Solaris came with 32-bit Postgresql 8.1.4 installed in /usr, but it is not ...
On Linux, I use stat --format="%s" FILE, but the Solaris machine I have access to doesn t have the stat command. What should I use then? I m writing Bash scripts and can t really install any ...
Is there a faster way to remove a directory then simply submitting rm -r -f *directory* ? I am asking this because our daily cross-platform builds are really huge (e.g. 4GB per build). So the ...
I am having a very strange requirement, Our client is having one network management system (Netcool) which reads the number of machine from two text file. Now whenever new machine is added in those ...
How to find the start up time of a Solaris 5.1 server using a shell script,need to know how much time it took to be on running state?I need to know how much time it took to come to running mode from ...
I have come across a very weird error. I m on Solaris 10, using Ruby Enterprise Edition (ruby 1.8.6 (2008-08-08 patchlevel 286) [i386-solaris2.10]) with Rails 2.3.4. I have a very weird error. In irb: ...
Where to set the JDK to be used by the SunOne server on Solaris? Is it all configured via an environment variable like JDK_HOME or JAVA_HOME, or is there a config file for the SunOne server somewhere ...
Perhaps this question is more suited for serverfault, but I m going to try here first anyway... Is there was a way to detect when a user uploads a file to a server and automatically check that file ...