sync - it allows users to synchronize cache data to permanent system memory to save important files and prevent data loss.
To synchronize all cached data for the current user to the permanent memory $ sync
To sync all mounted file systems $ sudo sync
To sync Specific files $ sync ./file1 ./file2
To sync file1 from home and file3 from /opt $ sync ./file1 /opt/file3
To sync file data only $ sync -d ./file1 ./file2 ./file3
To sync a directory $ sync ./test_dir
To sync a file system linked to a specific file $ sync -f test_file1
$ To view help options $ sync --help
regards, T.Dhanasekar