1,326 questions
0
votes
1
answer
49
views
Why doesn't ignore option for ls work in this instance? [duplicate]
I have a program like this (the indented lines can be run multiple times):
#!/bin/bash
options=""
options+=" --ignore={"
read pattern
options+='"'
options+="$...
1
vote
2
answers
147
views
Use of `std::variant` to select types after command prompt input, is that even possible?
I am at a very early stage in writing a C++ program replicating the most basic functions of the ls bash command.
I use the <filesystem> header.
The std::filesystem::directory_iterator and std::...
0
votes
0
answers
38
views
What exactly is the d_name in the dirent structure? [duplicate]
I am currently working on my own implementation of the ls command. While working with the dirent structure I noticed that most code for displaying the name of the file in a directory are like this:
...
0
votes
2
answers
92
views
Are all elements of the dirent structure open to use?
I am currently working on the implementation of my own "ls" command. I've been relying on the structure but I found an old post stating that some members of this structure such as d_type ...
0
votes
1
answer
64
views
Entering into the last modified sub-directory in a directory in linux
I have a dir in which I keep adding new dirs from a script. I want to enter that new sub-dir directly rather that always manually doing eza --sort=modified then copy pasting that name then cd into ...
2
votes
1
answer
162
views
Why is the double dot(parent directory) acting weird with the bin folder?
I started studying bash from the very beginning. I decided to practice using shortcuts for the current directory and the parent directory (dot and double dot). I noticed some strange behavior of the ...
0
votes
1
answer
71
views
How do I find files with ampersands in their names in Linux [closed]
I would have thought
ls \*\&\*
would work but it doesn't.
1
vote
1
answer
45
views
List absolute path to FILES in given directory and all subdirectories [closed]
I am trying to list the absolute path to all files in a given directory and all its subdirectories. I can almost get there using
ls -LR | xargs realpath
The only issue is that this also includes the ...
0
votes
1
answer
416
views
aws ls to list only files inside folders with a specific pattern and extension
I have a bucket with several folders, and inside each several files. I just want to list the .tsv files inside those folders that contain the pattern"*report_filtered_count10" in their name.
...
0
votes
1
answer
342
views
unable to add color to zstyle completion [closed]
I am using eza instead of ls and have made changes in .zshrc
alias ls="eza --icons=always"
I want to add colors to my zstyle completion
zstyle ':completion:*' list-colors "${(s.:.)...
1
vote
6
answers
4k
views
ls to show only date modified, time modified, and name
I try to remove all the columns from the output of ls -l command except date modified, time modified, and name.
drwxr-xr-x 5 john staff 160 May 16 01:59 some-folder
-rw-r--r--@ 1 john staff ...
-3
votes
1
answer
60
views
linux find in multiple directories limiting by MAX TOTAL SIZE
I have two directories in a 5TB HDD:
folderA
folderB
I need to rclone sync or rsync these two dirs in another HDD, but the storage is limited to 2TB.
So i decided to sync only the "newest"...
0
votes
0
answers
290
views
'ls' command for mounted FUSE filesystem keeps outputting ls: cannot access '/dfs': Input/output error
I am building a FUSE file system using my Ubuntu22 virtual machine on a macbook. I have implemented the getattr function below and compiled using gcc fuse-fs.c -o testfs `pkg-config fuse --cflags --...
15
votes
5
answers
7k
views
How to fix an issue with libgit2 after brew upgrade?
On macOS 13.2, in zsh, ls returns the following error message:
dyld[15164]: Library not loaded: /usr/local/opt/libgit2/lib/libgit2.1.6.dylib
Referenced from: <14346135-E664-31AF-A80B-05A5335ED5D7&...
0
votes
0
answers
68
views
File listing by using find, sort and ls commands
How can i see files bigger than 10MB sorted by their size and in descending order in my home directory, by using find sort and ls commands (terminal)?
I begin my pipe with this command:
find ~ -type f ...