Tag Info

New answers tagged

5

The most straightforward option would be find: $ cd /usr/lib; find . . ./libxcb-icccm.so.4.0.0 ./libbz2.so.1.0.6 ./libdca.so.0 ./libxcb-composite.so ./libyajl.so ./libswscale.so ./libxvidcore.so.4.3 ./libjasper.so.1 ./libdrm_intel.so.1 ... It has various tests for filtering such as: -type to filter based on type (regular file f, directory d, etc.) ...


0

It indicates that the socket exists in the abstract namespace. That is to say, there is no socket file in the filesystem named "/tmp/.X11-unix/X0" etc, so they can not be opened using the normal file open() system call, but rather can only be opened using the socket connect() call.


1

sudo overwrites the path for security reasons with a "secure" path. However you can modify this secure path to include your custom folder. Warning: this leaves your computer a bit unprotected. You can follow these steps for edit the secure path. Execute the command sudo visudo for edit /etc/sudoers Find this line (it should be at the start of the file): ...


4

This is fairly straightforward with recent versions of bash by using globbing and arrays, which is what I assume you mean by tables. First create some test files: path=/some/where touch $path/{a,b,c}_suffix.txt Here is an example that puts all files ending in _suffix.txt into the files array: files=("$path"/*_suffix.txt) To iterate over them you can ...


2

What you call a table is usually called an array or a map. In bash, to create such an array: path="/home/user/Documents" suffix="_suffix.txt" files=( "$path"/*"$suffix" ) The * is a wildcard, which is expanded by the shell to all matching filenames (that have $path before it and $suffix after). The brackets (()) convert the expanded filenames into an ...



Top 50 recent answers are included