Quantcast
Channel: User Kamil Maciorowski - Super User
Browsing all 645 articles
Browse latest View live

Answer by Kamil Maciorowski for Shell prompt colored outside of tmux, but not...

I assume the shell is Bash.In Ubuntu the skeletal (default) .bashrc contains this or similar snippet:# set a fancy prompt (non-color, unless we know we "want" color)case "$TERM" in...

View Article


Comment by Kamil Maciorowski on Mount ZFS encrypted dataset to be available...

"The encfs limits access of others even root to the folder I encrypt" – Because it uses FUSE that by design gives permission denied even to root (example). There is zfs-fuse but I don't know if it's an...

View Article


Comment by Kamil Maciorowski on How do I find files oldest by month? (or how...

Is GNU stat available?

View Article

Comment by Kamil Maciorowski on iptables not dropping udp port for exact ip...

serverfault.com/a/157418/1044055

View Article

Comment by Kamil Maciorowski on How do I find files by last day in a month?...

Is GNU stat available?

View Article


Comment by Kamil Maciorowski on tmux doesn't instantly update pane's title

What is the OS? What is the version of tmux? (tmux -V).

View Article

Answer by Kamil Maciorowski for How do I find files by last day in a month?...

SolutionWith GNU toolset:find . -type f -exec sh -c 'LC_ALL=C stat --printf="%.Y|%y|%n\0" -- "$@"' find-sh {} + \| LC_ALL=C sort -zr -t '|' -k 1,1 \| LC_ALL=C sort -zsu -t '|' -k 2.1,2.7 \| cut -d '|'...

View Article

Comment by Kamil Maciorowski on How do I delete all folders with a similar...

Do thumbnail images get generated automatically? Do their names follow some specific pattern? If so, an easy way may be to remove all thumbnails, then remove empty directories, finally let (wanted)...

View Article


Comment by Kamil Maciorowski on Error mounting NAS share with script and CIFS

Try REMOTE_SHARE='\\server_address\share_folder'. The <(echo …) part looks weird. < <(echo …) would be weird, but working. echo … | smbclient … would be almost fine. smbclient …<<<"…"...

View Article


Comment by Kamil Maciorowski on I can ssh and access the webserver but ping...

"When I do that from the same computer , the ping finishes with no problem" – (1) Does DB_Host.intranet.com resolve to the expected address here and there? (2) What is the output of cat...

View Article

Comment by Kamil Maciorowski on simple route to 192.168.1.1 always ends up in...

192.168.1.1 belongs to the Pi. When you connect to it from within the Pi, this happens.

View Article

Comment by Kamil Maciorowski on How to Clone a Single SSD to a RAID 1 Array?

"but it shows the three disks separately" – I think this means the RAID is a fake RAID. It will work as RAID only if the OS (or Clonezilla, or whatever you boot) understands it; in other words it needs...

View Article

Comment by Kamil Maciorowski on How to run command containing string variable...

How can we run a command stored in a variable? In short: do not store a command in a variable.

View Article


Comment by Kamil Maciorowski on how to delete all files that are old then X...

What is the explanation? If -regex '^.*[0-9]$' works, shouldn't -name '*[0-9]' have worked in the first place? Don't get me wrong, your code looks fine by itself; but the answer makes an impression...

View Article

Comment by Kamil Maciorowski on how to delete all files that are old then X...

-name '*[0-9]' is fine. The files in question were modified on August 7, some on August 5. The question was posted on August 8; at that time -mtime +6 did not match any of the files. Now I wonder how...

View Article


Comment by Kamil Maciorowski on What is the correct format to ping ip address...

@harrymc This does not look like code, probably examples written in ordinary language. The semicolon is a command terminator in most shells in Linux.

View Article

Answer by Kamil Maciorowski for Which Hard Drive?

Disconnecting the drives physically, connecting one by one and observing the pre-boot errors will probably allow you to determine the faulty drive. If you know which physical drive holds your OS,...

View Article


Comment by Kamil Maciorowski on Delivery of packets to the correct web...

They can be on a single (the default) port.

View Article

Answer by Kamil Maciorowski for how to delete all files that are old then X...

Please help me to build the right syntax.What you used:find . -type f -mtime +6 -name '*[0-9]' -print -deleteis the right syntax, with few caveats:-delete is not portable. In general, implementations...

View Article

Answer by Kamil Maciorowski for Why do string variables in a bash script...

The working commandWhen I copy and paste the command (/usr/bin/kid3-cli -c 'get''1-01 - Johann Strauss - __Waldmeister___ Ouverture.flac') into an interactive bash shell, i.e. at the command prompt, it...

View Article
Browsing all 645 articles
Browse latest View live