Steam for Linux

Steam for Linux

FookinRaw 3 Sep, 2021 @ 5:51am
Verify integrity of game files en masse
I cloned the HDD with my library on it to a SSD and for some reason every game got corrupted and needs to be re-validated.

Is there some command to verify the integrity of my entire library, rather than picking each game individually?
Last edited by FookinRaw; 3 Sep, 2021 @ 5:52am
< >
Showing 1-15 of 15 comments
Adam Beckett 3 Sep, 2021 @ 6:06am 
Steam Client > Settings > Downloads > Steam Library Folder > Right-Click on the Drive you want to repair > Select "Repair Library Folder".

... OR ...

... in your case, most likely you cloned the drive but did not 'tell' Steam the new drive letter?

Open the file "libraryfolder.vdf" with any text editor and edit the line:

"launcher" "C:\\Steam\\steam.exe" (... or whatever drive/directory your Steam client resides in now.

meheezen 3 Sep, 2021 @ 6:24am 
I dont recall having the “repair library” when running linux, has it been added recently?

How did you clone the disk?
What filesystem type?
Did you try removing the library path and adding it again (this should trigger a mass check of detected game files)
FookinRaw 3 Sep, 2021 @ 7:14am 
Originally posted by Adam Beckett:
Steam Client > Settings > Downloads > Steam Library Folder > Right-Click on the Drive you want to repair > Select "Repair Library Folder".

... OR ...

... in your case, most likely you cloned the drive but did not 'tell' Steam the new drive letter?

Open the file "libraryfolder.vdf" with any text editor and edit the line:

"launcher" "C:\\Steam\\steam.exe" (... or whatever drive/directory your Steam client resides in now.

That option is there, but sadly doesn't accomplish my goal. No drive letters in use, both drives we're mounted under /dev/sda and the games are detected/run just fine once I manually verify the game files integrity.

Originally posted by meheezen:
I dont recall having the “repair library” when running linux, has it been added recently?

How did you clone the disk?
What filesystem type?
Did you try removing the library path and adding it again (this should trigger a mass check of detected game files)

I cloned with a disk duplicator. Ext4 is file system. I'll try removing/re-adding the library and see if that does anything.
meheezen 3 Sep, 2021 @ 7:28am 
well, then there is something up with my Steam: https://i.imgur.com/6QpC4a9.png

Originally posted by FookinRaw:
I cloned with a disk duplicator. Ext4 is file system. I'll try removing/re-adding the library and see if that does anything.
are the permissions correct? correct UID and GID?
Last edited by meheezen; 3 Sep, 2021 @ 7:29am
FookinRaw 3 Sep, 2021 @ 7:47am 
Originally posted by meheezen:
well, then there is something up with my Steam: https://i.imgur.com/6QpC4a9.png

Originally posted by FookinRaw:
I cloned with a disk duplicator. Ext4 is file system. I'll try removing/re-adding the library and see if that does anything.
are the permissions correct? correct UID and GID?

Yes, permissions are correct. FWIW I'm in the beta program and have the repair library option.
I went into the steamapps directory via the terminal/console and ran

for id in $(ls *.acf | sed "s/appmanifest_//g" | sed "s/.acf/g") ; do steam steam://validate/$id ; done

this causes steam to validate everything that is installed by steam
Last edited by devilsclaw; 13 Jul @ 7:22am
Originally posted by devilsclaw:
I went into the steamapps directory via the terminal/console and ran

for id in $(ls *.acf | sed "s/appmanifest_//g" | sed "s/.acf/g") ; do steam steam://validate/$id ; done

this causes steam to validate everything that is installed by steam

I personally love the sed stream editor. I love sed, geany and mc. :HunkerDown:
Pepe 13 Jul @ 3:45pm 
Originally posted by devilsclaw:
I went into the steamapps directory via the terminal/console and ran

for id in $(ls *.acf | sed "s/appmanifest_//g" | sed "s/.acf/g") ; do steam steam://validate/$id ; done

this causes steam to validate everything that is installed by steam
This causes...
sed: -e expression #1, char 8: unterminated `s' command
Clearly there's a small typo there...

Because grzegorz77 loves sed, let's improve the one-liner and maybe learn something:

Must Have:
- the error above has a simple fix, there was a missing separator on the second sed process, thus sed thought s (substitution) command is unterminated because of the missing substitution part;
- g (global substitution) has no value here, because each line contains just one file name;
- piping another sed process is wasteful, we can use two expressions in a single sed process by using the -e option;

Nice to Have (good practice):
- double quotes on a sed that has a constant string rather than one with expanding members can be replaced with single quotes, making sure WYSIWYG (What You See Is What You Get);
- we can use double quotes on the Steam URI, ensuring any variable with blank spaces is taken as a whole part of that one parameter given to the command, and not sliced into multiple parameters;
- curly braces on an expanding variable inside a string is a good practice for that one weird case when the shell may unexpectedly decide to pick $ids instead of $id or vice-versa;
- if semantics are important, we can add special characters that suggests we're looking for the first expression at the beginning of the name (^), and the seond one at the end of the string ($)
for id in $(ls *.acf | sed -e 's/^appmanifest_//' -e 's/.acf$//'); do steam "steam://validate/${id}"; done

But there's more. If semantics is more important than performance, maybe using a Regular Expression is a good option to see the whole file name and the extracted parts (in this case just one part, the app id):
for id in $(ls *.acf | sed -r 's/^appmanifest_(.*)\.acf$/\1/'); do steam "steam://validate/${id}"; done
Last edited by Pepe; 13 Jul @ 3:50pm
A lot of knowledge, faithful listeners thank you for this lesson.

Yes, I love sed, but it is a difficult love because I am a beginner at this.
Since I use it rarely, I have to check the syntax every time and try to understand how it works again.

For those who understood nothing:
sed s/^appmanifest_//
s / 1 / 2 /
s - searches for (1) and replaces with (2) - only first appearance in verse
^ - beginning of the verse

sed "s/appmanifest_//";"s/.acf//"
from a file or data string, it will remove the first occurrence of appmanifest_ and .acf
](edit: to see what I wrote above, click quote)
edit 2:

sed "s/appmanifest_/";"s/.acf/"

Well, it doesn't help at all, this forum just tries to be smarter than us. Instead of listening orders.

:p2chell:

edit:
sed "s/appmanifest_/ /";"s/.acf/ /"
- here it will replace with spaces, which is undesirable, but
steam is determined to make a www link out of this
Last edited by grzegorz77; 14 Jul @ 6:11am
Pepe 14 Jul @ 3:43am 
Originally posted by grzegorz77:
[...] steam is determined to make a www link out of this
Use [noparse][/noparse].
Last edited by Pepe; 14 Jul @ 3:43am
Unfortunately, I don't know why but it doesn't work.

[noparse][/noparse]
[code][noparse] /noparse][/code]

sed "s/appmanifest_//";"s/.acf//"

removes the underline, but still cuts off /

edit:
I was hitting it with a hammer with my eyes closed until it started working.
Last edited by grzegorz77; 14 Jul @ 6:00am
Pepe 14 Jul @ 5:21am 
I don't remember exactly the use case, but noparse has a "feature" when you have any kind of space before or after it.

This seems to work fine:
[code][noparse]start code 1 slash / 2 slashes // 3 slashes /// end code[/code][/noparse]

start code 1 slash / 2 slashes // 3 slashes /// end code

Later Edit: this doesn't show right the format code in italic. You have to quote the post and copy paste the last segment of [code]. Anyway, bellow I made it, finally.
Last edited by Pepe; 14 Jul @ 5:56am
Pepe 14 Jul @ 5:48am 
Actually there's a [/noparse] before [/code]. Even that doesn't work right. :csgo_loser: I guess it closes the [noparse] segment at the first [/noparse].

Let's try using more noparse blocks to make it show what we supposed to use.

[code][noparse]start code 1 slash / 2 slashes // 3 slashes /// end code[/noparse][/code]

There are more "features" to [noparse] than initially thought. :lunar2019crylaughingpig: It does make some sense though. The algorithm is "greedy", it takes the first occurrence of a closing block, rather than taking the last one. If the last one was used, you wouldn't be able to have multiple sections of [noparse].
Last edited by Pepe; 14 Jul @ 6:04am
I don't know what it's about, whether it's about spaces, the end of line character, or the font. It doesn't work in the way I would have expected.

I'm pasting your text and it works, I'm writing the same thing and it doesn't work. Maybe it's about the set text encoding.

But thank you very much for the advice.

I have no idea why it doesn't work, maybe it's a low caffeine level, maybe I slept too little, or I ate too much.
But something is probably just broken in Steam.


I was hitting it with a hammer with my eyes closed until it started working.
That was probably the correct method today.
If you can't screw in the screw to tighten it, turn the world until the screw is tightened. :p2chell:
inT 17 Jul @ 3:13pm 
Originally posted by FookinRaw:
I cloned the HDD with my library on it to a SSD and for some reason every game got corrupted and needs to be re-validated.

Is there some command to verify the integrity of my entire library, rather than picking each game individually?
< >
Showing 1-15 of 15 comments
Per page: 1530 50