Sample Header Ad - 728x90

Strip filesize from rclone file list

3 votes
3 answers
378 views
I use rclone and I want to have the file list without the size of the files mention. I can't find how to do this in rclone so I thought of stripping it with awk or something like that. My output looks like this
59183070 fileserver/transfer_kimberly_2022-12-18_0558 (1).zip
     3690 fileserver/transfer_kimberly_2022-12-18_0558 (1).zip - Shortcut.lnk
 35961190 fileserver/transfer_2023-06-27_0814.zip
  7803667 fileserver/woodproject.zip
7437905920 Them/Data/Before_20230526132130642.FDB
1064525824 Them/Data/Updating_20220705231152059.FDB
1064525824 Them backup/Data/Updating_20220706231124156.FDB
1064525824 Them backup/Data/Updating_20220705231152059.FDB
1064525824 Them backup/Data/Updating_20220706231124156.FDB
  7004362 test.zip
  7004362 test (1).zip
  7803667 37939 37/Data/Updating_20220706231124156.FDB
  7803667 37939/Data/Updating_20220706231124156.FDB
The first number left is the filesize. I want this output
fileserver/transfer_kimberly_2022-12-18_0558 (1).zip
fileserver/transfer_kimberly_2022-12-18_0558 (1).zip - Shortcut.lnk
fileserver/transfer_2023-06-27_0814.zip
fileserver/woodproject.zip
Them/Data/Before_20230526132130642.FDB
Them/Data/Updating_20220705231152059.FDB
Them backup/Data/Updating_20220706231124156.FDB
Them backup/Data/Updating_20220705231152059.FDB
Them backup/Data/Updating_20220706231124156.FDB
test.zip
test (1).zip
37939 37/Data/Updating_20220706231124156.FDB
37939/Data/Updating_20220706231124156.FDB
I thought about stripping everything left of the last space that comes before the first /. But the space in the first directory or file names makes it complicated. Help is appreciated
Asked by unixcandles (87 rep)
Mar 12, 2024, 07:58 AM
Last activity: Mar 13, 2024, 11:54 AM