Shell show same files in the same path? [closed] - shell

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I got two output folders when I type ls -l on shell.
MyBookLive:~/download/# ls -l
drwxrwxrw- 4 root root 65536 2013-12-20 12:33 output
drwxrwxrw- 3 root root 65536 2013-12-20 12:33 output
And I am sure there is no spaces in filename, because when I hit tab key, it shows:
MyBookLive:~/download/# ls -l output
output/ output/
Why? Thanks.

The second "output" has character 129 after the last "t".
Try this in your browser's console, copying the "output/ output/" string from your question.
"output/ output/".split('').forEach(function(x){console.log(x, x.charCodeAt(0))})

Related

Size of Folders [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I would like to delete all empty folders in a folder without having to open all of them. Unfortunately the size is not displayed next to the folder name. I already tried to adjust it under "options" but it is still not working.
Would anyone know how to do display the size?
Thank you!
You might try using tree function: on my PC I have created three subfolders and only one of them contains a file. The result of the tree command looks as follows:
C:\Temp_Folder>tree /F /A
Folder PATH listing
Volume serial number is 261B-B97E
C:.
| Ga_van_A_naar_B_in_de_VS.png
| landen
|
+---tralala
| test.txt
|
+---tralalala
\---tralalalala
As you see, when the next directory comes directly on the next line, this means your directory is empty (you need /F to see the files inside the directories for verifying they're empty or not).

In git when adding files, a number of files appear as different, what does the symbol # mean when ls in terminal? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
In git when adding files, a number of files appear as different, what does the symbol # mean when ls in terminal?
For example, when running ls -lh, what does the # symbol denote? This is run on MacOS - item2 bash, if that makes any difference.
the following is the output of two files but one with an # behind it. permissions are similar and both are files in the same directory :
-rw-r--r-- 1 me staff 10K 10 Jan 10:10 README.fileone.md
-rw-r--r--# 1 me staff 10K 11 Jan 10:10 README.filetwo.md
and the recommended way(s)/commands to change these files.
edit
thanks for answers below.
summary of answer
use xattr to view or edit the file
$xattr -c filename.xxx # deletes ALL extended attributes from file
$xattr -l filename.xxx # views attributes from file
The file has extended attributes. With xattr command-line utility you can inspect and modify them.

Total size of all file types in a folder [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
Is there any way/too in window7 to see the total size of files of particular type ? For example if I have directory which has 5 files. 2 files are Jpg, 1 is log file and 2 are docx file. In such case, it should report something like below
jpg - 2 files- Total size -10 MB
log file - 1 file- Total size -5KM
document file - 2 file - Total -45 MB
-Rajesh
Is there a way to do this in linux (e.g. some form of ls or grep)? If there is, it is probably supported by cygwin.
In other words, you could install cygwin and then run something like the 'find' command shown here: https://askubuntu.com/questions/558979/how-to-display-disk-usage-by-file-type.
Also, if you put the cygwin executable directory in your PATH environment you can run all of the cywin commands from a windows command prompt.
And if you just want a good way to see where all of your disk space is being used there are a number of good tools for that. I personally like spacesniffer.
You can start a command window and use dir.
ex:
dir *.txt

Redirecting input of an interactive script [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I want to redirect input of an interactive program/script to a different program. I did with nc in the following way.
Bash 1
nc -nlvp 100 | script
Bash 2
nc 127.0.0.1 100
It works, but are there any better ways? Can I redirect input of an interactive script without nc/sockets?
If you know the PID of the process you want to send characters to over stdin, then simply write to /proc/$pid/fr/0. Example:
Shell 1:
$ cat
Shell 2:
$ pidof cat
12345
$ cat > /proc/12345/fd/0
hello
Result in Shell 1:
hello

What is the difference between 'ls --color' and 'ls --color=tty'? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I am making an alias for ls in my .zshrc profile so that it always has a colored output. As it turns out, I stumbled across either
alias ls="ls --color=tty"
or, without the tty value
alias ls="ls --color"
Is there any particular situation where either the commands $ ls --color=tty and $ ls --color, or the above aliases, can behave differently ?
With no argument attached to the option (--color), the output is always colorized. With --color=tty, it is only colorized when stdout is connected to a tty. This matters when the output of ls is piped or redirected.

Resources