Maybe your character set is set to UTF-8 when you don't actually have a UTF-8 terminal. LC_ALL=C prevents it from trying to use fancy unicode line-printing characters.
But when I run below command, tree structure getting
what is permanent solution to print tree structure with "tree" command.
The set of language-specific characters in your environment is (maybe erronously) set so that the line-drawing characters are replaced by some other characters (which you called "junk"). Which set of characters is taking these places (german umlauts, french accents, ....) is controlled by the "LC_ALL" variable. To set this variable to "C" means to use a set of characters without any diacriticals at all, which is enough for english language but probably no other.
When you enter a certain setting for a variable and then a command it means that the value for this variable is in effect only for this one command. This means:
The first of the two commands will have set LC_ALL to "C" and therefore work, the second one will produce junk again because "LC_ALL" is set to something else.
Solution: set the variable somewhere where it has a lasting effect. The best place is your shells startup file: "~/.kshrc" if you use ksh (Korn shell), "~/.bashrc" if you use bash (Bourne Again Shell).
Hello friends,
There is one requirment where I need to login into database environment and pull all schema names into a text file ...
as of now below are the schemas available...
$> describe keyspaces;
system_schema system_auth system abc system_distributed system_traces
Now from... (4 Replies)
Hi,
in my script, i take the last month by
a=$(date --date '1 month ago' +%Y%m)
i expect that it give me in this month "March" as result 201402,
but linux gave me 201403.
IMPe@ABC123:> ~/date --date '1 month ago' +%Y%m
201403
i'm reasonably confused. Any idea?
Thanks in advance,
... (2 Replies)
Hi all,
Can any guru please help on how I can tweak the following ps command so that it only shows the lines that I wanted.
$ command ps -HAcl -F S -A f
F S UID PID PPID CLS PRI ADDR SZ WCHAN RSS PSR STIME TTY TIME CMD
4 S root 1 0 TS 24 - 2592 ? ... (3 Replies)
Hi, I have this command:
ls -R | grep ":$" | sed -e 's/:$//' -e 's/*\//--/g' -e 's/^/ /' -e 's/-/|/' Works nicely to show the current file structure as a tree.
I'd like to have it as an alias in '' but doesn't work just like that and I can't fix it with backslashes:
alias tree='?'
... (4 Replies)
Hi All
I'm using a tree command in a script that for me outputs:-
| - - DIRECTORYNAME
However a different user is getting the following output:-
aaa (actually with an umlat above them) DIRECTORYNAME
I'm not sure where this could be coming from, any ideas anyone? (0 Replies)
How can i install tree command in ubundu without root ? I have found some shell script which does the same job as tree but i would like to get all the options in tree command
thanks (2 Replies)
In DOS, to get the complete directory structure, we use 'TREE' command..
can anyone tell me what is the equivalent command in Unix
I am using
SunOS ABC 5.8 Generic_117350-18 sun4u sparc SUNW,Sun-Fire-V240
thanks.. (1 Reply)
Hi,
I am new to UNIX and I am more used to simple commands like those in VMS.
One of them is the ability to get the output from a job using the /out=<file> command in VMS.
I want to submit a job (a set of unix commands) using the AT command but to get the output in a file like that used in... (4 Replies)